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
12 $this->obj
= new HTMLPurifier_AttrTransform_BgColor();
15 function testEmptyInput() {
16 $this->assertResult( array() );
19 function testBasicTransform() {
21 array('bgcolor' => '#000000'),
22 array('style' => 'background-color:#000000;')
26 function testPrependNewCSS() {
28 array('bgcolor' => '#000000', 'style' => 'font-weight:bold'),
29 array('style' => 'background-color:#000000;font-weight:bold')
33 function testLenientTreatmentOfInvalidInput() {
34 // this may change when we natively support the datatype and
35 // validate its contents before forwarding it on
37 array('bgcolor' => '#F00'),
38 array('style' => 'background-color:#F00;')