3 // we currently rely on the CSS validator to fix any problems.
4 // This means that this transform, strictly speaking, supports
5 // a superset of the functionality.
7 class HTMLPurifier_AttrTransform_BgColorTest
extends HTMLPurifier_AttrTransformHarness
10 public function setUp()
13 $this->obj
= new HTMLPurifier_AttrTransform_BgColor();
16 public function testEmptyInput()
18 $this->assertResult( array() );
21 public function testBasicTransform()
24 array('bgcolor' => '#000000'),
25 array('style' => 'background-color:#000000;')
29 public function testPrependNewCSS()
32 array('bgcolor' => '#000000', 'style' => 'font-weight:bold'),
33 array('style' => 'background-color:#000000;font-weight:bold')
37 public function testLenientTreatmentOfInvalidInput()
39 // this may change when we natively support the datatype and
40 // validate its contents before forwarding it on
42 array('bgcolor' => '#F00'),
43 array('style' => 'background-color:#F00;')