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( '
', '
' ); } function testAutoCloseMultiple() { $this->assertResult( '
asdf', '
asdf' ); } function testUnrecognized() { $this->assertResult( 'foo', 'foo' ); } function testBlockquoteWithInline() { $this->config->set('HTML', 'Doctype', 'XHTML 1.0 Strict'); $this->assertResult( // This is actually invalid, but will be fixed by // ChildDef_StrictBlockquote '
foobar
' ); } function testLongCarryOver() { $this->assertResult( 'asdf
asdfdf
asdf
', 'asdf
asdfdf
asdf' ); } function testInterleaved() { $this->assertResult( 'foobarbaz', 'foobarbaz' ); } } // vim: et sw=4 sts=4