obj = new HTMLPurifier_Strategy_MakeWellFormed(); $this->config->set('AutoFormat', 'AutoParagraph', true); $this->config->set('AutoFormat', 'Linkify', true); } function testOnlyAutoParagraph() { $this->assertResult( 'Foobar', '
Foobar
' ); } function testParagraphWrappingOnlyLink() { $this->assertResult( 'http://example.com', '' ); } function testParagraphWrappingNodeContainingLink() { $this->assertResult( 'http://example.com', '' ); } function testParagraphWrappingPoorlyFormedNodeContainingLink() { $this->assertResult( 'http://example.com', '' ); } function testTwoParagraphsContainingOnlyOneLink() { $this->assertResult( "http://example.com\n\nhttp://dev.example.com", '' ); } function testParagraphNextToDivWithLinks() { $this->assertResult( 'http://example.comThis URL http://example.com is what you need
' ); } }