Release 2.0.1, merged in 1181 to HEAD.
[htmlpurifier.git] / tests / HTMLPurifier / AttrTransform / BoolToCSSTest.php
blob70b4fbdbf54702ad0ebc570d9fe5a67e351c1caf
1 <?php
3 require_once 'HTMLPurifier/AttrTransform/BoolToCSS.php';
4 require_once 'HTMLPurifier/AttrTransformHarness.php';
6 class HTMLPurifier_AttrTransform_BoolToCSSTest extends HTMLPurifier_AttrTransformHarness
9 function setUp() {
10 parent::setUp();
11 $this->obj = new HTMLPurifier_AttrTransform_BoolToCSS('foo', 'bar:3in;');
14 function test() {
16 $this->assertResult( array() );
18 $this->assertResult(
19 array('foo' => 'foo'),
20 array('style' => 'bar:3in;')
23 // boolean attribute just has to be set: we don't care about
24 // anything else
25 $this->assertResult(
26 array('foo' => 'no'),
27 array('style' => 'bar:3in;')
30 $this->assertResult(
31 array('foo' => 'foo', 'style' => 'background-color:#F00;'),
32 array('style' => 'bar:3in;background-color:#F00;')