3 class HTMLPurifier_ChildDef_OptionalTest
extends HTMLPurifier_ChildDefHarness
6 public function setUp()
9 $this->obj
= new HTMLPurifier_ChildDef_Optional('b | i');
12 public function testBasicUsage()
14 $this->assertResult('<b>Bold text</b><img />', '<b>Bold text</b>');
17 public function testRemoveForbiddenText()
19 $this->assertResult('Not allowed text', '');
22 public function testEmpty()
24 $this->assertResult('');
27 public function testWhitespace()
29 $this->assertResult(' ');
32 public function testMultipleWhitespace()
34 $this->assertResult(' ');