3 class HTMLPurifier_AttrTransform_LengthTest
extends HTMLPurifier_AttrTransformHarness
8 $this->obj
= new HTMLPurifier_AttrTransform_Length('width');
11 function testEmptyInput() {
12 $this->assertResult( array() );
15 function testTransformPixel() {
17 array('width' => '10'),
18 array('style' => 'width:10px;')
22 function testTransformPercentage() {
24 array('width' => '10%'),
25 array('style' => 'width:10%;')
29 function testPrependNewCSS() {
31 array('width' => '10%', 'style' => 'font-weight:bold'),
32 array('style' => 'width:10%;font-weight:bold')
36 function testLenientTreatmentOfInvalidInput() {
38 array('width' => 'asdf'),
39 array('style' => 'width:asdf;')