obj = new HTMLPurifier_Strategy_MakeWellFormed();
$this->config = array();
}
function testNormalIntegration() {
$this->assertResult('');
$this->assertResult('This is bold text.');
}
function testUnclosedTagIntegration() {
$this->assertResult(
'Unclosed tag, gasp!',
'Unclosed tag, gasp!'
);
$this->assertResult(
'Bold and italic?',
'Bold and italic?'
);
$this->assertResult(
'Unused end tags... recycle!',
'Unused end tags... recycle!'
);
}
function testEmptyTagDetectionIntegration() {
$this->assertResult(
'
',
'
'
);
$this->assertResult(
'
Paragraph 1
Paragraph 2', '
Paragraph 1
Paragraph 2
' ); $this->assertResult( 'Paragraphs
In
A
Div
Paragraphs
In
A
Div
Foobar
' ); $this->assertResult( 'http://example.com', '' ); $this->assertResult( 'http://example.com', '' ); $this->assertResult( 'http://example.com', '' ); $this->assertResult( 'http://example.com http://dev.example.com', '' ); $this->assertResult( 'http://example.comThis URL http://example.com is what you need
' ); } }