Add vim modelines to all files.
[htmlpurifier/bfroehle.git] / tests / HTMLPurifier / AttrTransform / LengthTest.php
blob3fbaa0ccf0a57fd6b9748ec44a2eac6c02953f7e
1 <?php
3 class HTMLPurifier_AttrTransform_LengthTest extends HTMLPurifier_AttrTransformHarness
6 function setUp() {
7 parent::setUp();
8 $this->obj = new HTMLPurifier_AttrTransform_Length('width');
11 function testEmptyInput() {
12 $this->assertResult( array() );
15 function testTransformPixel() {
16 $this->assertResult(
17 array('width' => '10'),
18 array('style' => 'width:10px;')
22 function testTransformPercentage() {
23 $this->assertResult(
24 array('width' => '10%'),
25 array('style' => 'width:10%;')
29 function testPrependNewCSS() {
30 $this->assertResult(
31 array('width' => '10%', 'style' => 'font-weight:bold'),
32 array('style' => 'width:10%;font-weight:bold')
36 function testLenientTreatmentOfInvalidInput() {
37 $this->assertResult(
38 array('width' => 'asdf'),
39 array('style' => 'width:asdf;')
45 // vim: et sw=4 sts=4