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( '
', '
' ); } function testAutoCloseParagraph() { $this->assertResult( '

Paragraph 1

Paragraph 2', '

Paragraph 1

Paragraph 2

' ); } function testAutoCloseParagraphInsideDiv() { $this->assertResult( '

Paragraphs

In

A

Div

', '

Paragraphs

In

A

Div

' ); } function testAutoCloseListItem() { $this->assertResult( '
  1. Item 1
  2. Item 2
', '
  1. Item 1
  2. Item 2
' ); } function testAutoCloseColgroup() { $this->assertResult( '
', '
' ); } }