obj = new HTMLPurifier_Strategy_MakeWellFormed ();
}
public function testEmptyInput() {
$this->assertResult ( '' );
}
public function testWellFormedInput() {
$this->assertResult ( 'This is bold text.' );
}
public function testUnclosedTagTerminatedByDocumentEnd() {
$this->assertResult ( 'Unclosed tag, gasp!', 'Unclosed tag, gasp!' );
}
public function testUnclosedTagTerminatedByParentNodeEnd() {
$this->assertResult ( 'Bold and italic?', 'Bold and italic?' );
}
public function testRemoveStrayClosingTag() {
$this->assertResult ( 'Unused end tags... recycle!', 'Unused end tags... recycle!' );
}
public function testConvertStartToEmpty() {
$this->assertResult ( '
', '
' );
}
public function testConvertEmptyToStart() {
$this->assertResult ( '
Paragraph 1
Paragraph 2', '
Paragraph 1
Paragraph 2
' ); } public function testAutoCloseParagraphInsideDiv() { $this->assertResult ( 'Paragraphs
In
A
Div
Paragraphs
In
A
Div
foobar' ); } public function testLongCarryOver() { $this->assertResult ( 'asdf
foo |