Add documents on how to restructure configuration directives.
[htmlpurifier.git] / tests / HTMLPurifier / ChildDef / OptionalTest.php
bloba5f34f7b1ecbbc8481283c83a8596a69208576dc
1 <?php
3 class HTMLPurifier_ChildDef_OptionalTest extends HTMLPurifier_ChildDefHarness
6 function setUp() {
7 parent::setUp();
8 $this->obj = new HTMLPurifier_ChildDef_Optional('b | i');
11 function testBasicUsage() {
12 $this->assertResult('<b>Bold text</b><img />', '<b>Bold text</b>');
15 function testRemoveForbiddenText() {
16 $this->assertResult('Not allowed text', '');
19 function testEmpty() {
20 $this->assertResult('');
23 function testWhitespace() {
24 $this->assertResult(' ');
27 function testMultipleWhitespace() {
28 $this->assertResult(' ');
33 // vim: et sw=4 sts=4