Add vim modelines to all files.
[htmlpurifier.git] / tests / HTMLPurifier / AttrDef / CSS / LengthTest.php
blob9d9fc41f2f59a68fb4870f0953d8905cf24635c3
1 <?php
3 class HTMLPurifier_AttrDef_CSS_LengthTest extends HTMLPurifier_AttrDefHarness
6 function test() {
8 $this->def = new HTMLPurifier_AttrDef_CSS_Length();
10 $this->assertDef('0');
11 $this->assertDef('0px');
12 $this->assertDef('4.5px');
13 $this->assertDef('-4.5px');
14 $this->assertDef('3ex');
15 $this->assertDef('3em');
16 $this->assertDef('3in');
17 $this->assertDef('3cm');
18 $this->assertDef('3mm');
19 $this->assertDef('3pt');
20 $this->assertDef('3pc');
22 $this->assertDef('3PX', '3px');
24 $this->assertDef('3', false);
25 $this->assertDef('3miles', false);
29 function testNonNegative() {
31 $this->def = new HTMLPurifier_AttrDef_CSS_Length('0');
33 $this->assertDef('3cm');
34 $this->assertDef('-3mm', false);
38 function testBounding() {
39 $this->def = new HTMLPurifier_AttrDef_CSS_Length('-1in', '1in');
40 $this->assertDef('1cm');
41 $this->assertDef('-1cm');
42 $this->assertDef('0');
43 $this->assertDef('1em', false);
48 // vim: et sw=4 sts=4