3 class HTMLPurifier_Strategy_MakeWellFormed_EndInsertInjectorTest
extends HTMLPurifier_StrategyHarness
7 $this->obj
= new HTMLPurifier_Strategy_MakeWellFormed();
8 $this->config
->set('AutoFormat.Custom', array(
9 new HTMLPurifier_Strategy_MakeWellFormed_EndInsertInjector()
12 function testEmpty() {
13 $this->assertResult('');
15 function testNormal() {
16 $this->assertResult('<i>Foo</i>', '<i>Foo<b>Comment</b></i>');
18 function testEndOfDocumentProcessing() {
19 $this->assertResult('<i>Foo', '<i>Foo<b>Comment</b></i>');
21 function testDoubleEndOfDocumentProcessing() {
22 $this->assertResult('<i><i>Foo', '<i><i>Foo<b>Comment</b></i><b>Comment</b></i>');
24 function testEndOfNodeProcessing() {
25 $this->assertResult('<div><i>Foo</div>asdf', '<div><i>Foo<b>Comment</b></i></div><i>asdf<b>Comment</b></i>');
27 function testEmptyToStartEndProcessing() {
28 $this->assertResult('<i />', '<i><b>Comment</b></i>');
30 function testSpuriousEndTag() {
31 $this->assertResult('</i>', '');
33 function testLessButStillSpuriousEndTag() {
34 $this->assertResult('<div></i></div>', '<div></div>');