obj = new HTMLPurifier_ChildDef_StrictBlockquote ( 'div | p' ); } public function testEmptyInput() { $this->assertResult ( '' ); } public function testPreserveValidP() { $this->assertResult ( '
Valid
' ); } public function testPreserveValidDiv() { $this->assertResult ( 'Needs wrap
' ); } public function testNoWrapForWhitespaceOrValidElements() { $this->assertResult ( 'Do not wrap
Whitespace
' ); } public function testWrapTextNextToValidElements() { $this->assertResult ( 'Wrap' . 'Do not wrap
', 'Wrap
Do not wrap
' ); } public function testWrapInlineElements() { $this->assertResult ( 'Do not
' . 'Wrap', 'Do not
Wrap
' ); } public function testWrapAndRemoveInvalidTags() { $this->assertResult ( 'Hmm.
', 'Not allowedParagraph.
Hmm.
' ); } public function testWrapComplicatedSring() { $this->assertResult ( $var = 'He said$var
" ); } public function testWrapAndRemoveInvalidTagsComplex() { $this->assertResult ( 'Fools!
', 'Bar' . 'PeopleConniving.
Fools!
' ); } public function testAlternateWrapper() { $this->config->set ( 'HTML.BlockWrapper', 'div' ); $this->assertResult ( 'Needs wrap', 'Needs wrap
' ); } } // vim: et sw=4 sts=4