3 class HTMLPurifier_AttrTransform_BackgroundTest
extends HTMLPurifier_AttrTransformHarness
8 $this->obj
= new HTMLPurifier_AttrTransform_Background();
11 function testEmptyInput() {
12 $this->assertResult( array() );
15 function testBasicTransform() {
17 array('background' => 'logo.png'),
18 array('style' => 'background-image:url(logo.png);')
22 function testPrependNewCSS() {
24 array('background' => 'logo.png', 'style' => 'font-weight:bold'),
25 array('style' => 'background-image:url(logo.png);font-weight:bold')
29 function testLenientTreatmentOfInvalidInput() {
30 // notice that we rely on the CSS validator later to fix this invalid
33 array('background' => 'logo.png);foo:('),
34 array('style' => 'background-image:url(logo.png);foo:();')