3 class HTMLPurifier_AttrTransform_BackgroundTest
extends HTMLPurifier_AttrTransformHarness
6 public function setUp()
9 $this->obj
= new HTMLPurifier_AttrTransform_Background();
12 public function testEmptyInput()
14 $this->assertResult( array() );
17 public function testBasicTransform()
20 array('background' => 'logo.png'),
21 array('style' => 'background-image:url(logo.png);')
25 public function testPrependNewCSS()
28 array('background' => 'logo.png', 'style' => 'font-weight:bold'),
29 array('style' => 'background-image:url(logo.png);font-weight:bold')
33 public function testLenientTreatmentOfInvalidInput()
35 // notice that we rely on the CSS validator later to fix this invalid
38 array('background' => 'logo.png);foo:('),
39 array('style' => 'background-image:url(logo.png);foo:();')