3 class HTMLPurifier_AttrTransform_ImgSpaceTest
extends HTMLPurifier_AttrTransformHarness
8 $this->obj
= new HTMLPurifier_AttrTransform_ImgSpace('vspace');
11 function testEmptyInput() {
12 $this->assertResult( array() );
15 function testVerticalBasicUsage() {
17 array('vspace' => '1'),
18 array('style' => 'margin-top:1px;margin-bottom:1px;')
22 function testLenientHandlingOfInvalidInput() {
24 array('vspace' => '10%'),
25 array('style' => 'margin-top:10%px;margin-bottom:10%px;')
29 function testPrependNewCSS() {
31 array('vspace' => '23', 'style' => 'font-weight:bold;'),
32 array('style' => 'margin-top:23px;margin-bottom:23px;font-weight:bold;')
36 function testHorizontalBasicUsage() {
37 $this->obj
= new HTMLPurifier_AttrTransform_ImgSpace('hspace');
39 array('hspace' => '1'),
40 array('style' => 'margin-left:1px;margin-right:1px;')
44 function testInvalidConstructionParameter() {
45 $this->expectError('ispace is not valid space attribute');
46 $this->obj
= new HTMLPurifier_AttrTransform_ImgSpace('ispace');
48 array('ispace' => '1'),