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