Fix two minor bugs, updating Phorum and removing unused $dir variable.
[htmlpurifier/darkodev.git] / tests / HTMLPurifier / AttrTransform / BackgroundTest.php
blob0730ab4bc3aefb89c17fb970e634b9d362dccf65
1 <?php
3 class HTMLPurifier_AttrTransform_BackgroundTest extends HTMLPurifier_AttrTransformHarness
6 function setUp() {
7 parent::setUp();
8 $this->obj = new HTMLPurifier_AttrTransform_Background();
11 function testEmptyInput() {
12 $this->assertResult( array() );
15 function testBasicTransform() {
16 $this->assertResult(
17 array('background' => 'logo.png'),
18 array('style' => 'background-image:url(logo.png);')
22 function testPrependNewCSS() {
23 $this->assertResult(
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
31 // stuff
32 $this->assertResult(
33 array('background' => 'logo.png);foo:('),
34 array('style' => 'background-image:url(logo.png);foo:();')
40 // vim: et sw=4 sts=4