obj = new HTMLPurifier_Strategy_MakeWellFormed(); $this->config->set('AutoFormat', 'Custom', array( new HTMLPurifier_Strategy_MakeWellFormed_EndInsertInjector() )); } function testEmpty() { $this->assertResult(''); } function testNormal() { $this->assertResult('Foo', 'FooComment'); } function testEndOfDocumentProcessing() { $this->assertResult('Foo', 'FooComment'); } function testDoubleEndOfDocumentProcessing() { $this->assertResult('Foo', 'FooCommentComment'); } function testEndOfNodeProcessing() { $this->assertResult('
Foo
', '
FooComment
'); } function testEmptyToStartEndProcessing() { $this->assertResult('', 'Comment'); } function testSpuriousEndTag() { $this->assertResult('', ''); } function testLessButStillSpuriousEndTag() { $this->assertResult('
', '
'); } }