obj = new HTMLPurifier_Strategy_MakeWellFormed();
$this->config->set('AutoFormat.Custom', array(
new HTMLPurifier_Strategy_MakeWellFormed_EndInsertInjector()
));
}
public function testEmpty()
{
$this->assertResult('');
}
public function testNormal()
{
$this->assertResult('Foo', 'FooComment');
}
public function testEndOfDocumentProcessing()
{
$this->assertResult('Foo', 'FooComment');
}
public function testDoubleEndOfDocumentProcessing()
{
$this->assertResult('Foo', 'FooCommentComment');
}
public function testEndOfNodeProcessing()
{
$this->assertResult('
Foo
asdf', 'FooComment
asdfComment');
}
public function testEmptyToStartEndProcessing()
{
$this->assertResult('', 'Comment');
}
public function testSpuriousEndTag()
{
$this->assertResult('', '');
}
public function testLessButStillSpuriousEndTag()
{
$this->assertResult('', '');
}
}
// vim: et sw=4 sts=4