config->set('AutoFormat.AutoParagraph', true); } function testSingleParagraph() { $this->assertResult( 'Foobar', '
Foobar
' ); } function testSingleMultiLineParagraph() { $this->assertResult( 'Par 1 Par 1 still', 'Par 1 Par 1 still
' ); } function testTwoParagraphs() { $this->assertResult( 'Par1 Par2', "Par1
Par2
" ); } function testTwoParagraphsWithLotsOfSpace() { $this->assertResult( 'Par1 Par2', 'Par1
Par2
' ); } function testTwoParagraphsWithInlineElements() { $this->assertResult( 'Par1 Par2', 'Par1
Par2
' ); } function testSingleParagraphThatLooksLikeTwo() { $this->assertResult( 'Par1 Par2', 'Par1 Par2
' ); } function testAddParagraphAdjacentToParagraph() { $this->assertResult( 'Par1Par2
', 'Par1
Par2
' ); } function testParagraphUnclosedInlineElement() { $this->assertResult( 'Par1', 'Par1
' ); } function testPreservePreTags() { $this->assertResult( 'Par1 Par1' ); } function testIgnoreTrailingWhitespace() { $this->assertResult( 'Par1 ', '
Par1
' ); } function testDoNotParagraphBlockElements() { $this->assertResult( 'Par1Par1
Par3
' ); } function testParagraphTextAndInlineNodes() { $this->assertResult( 'Par1', 'Par1
' ); } function testPreserveLeadingWhitespace() { $this->assertResult( ' Par', 'Par
' ); } function testPreserveSurroundingWhitespace() { $this->assertResult( ' Par ', 'Par
' ); } function testParagraphInsideBlockNode() { $this->assertResult( 'Par1
Par2
Par1
Par2
Par1
Par2
Par1 Par2' ); } function testSplitUpInternalsOfPTagInBlockNode() { $this->assertResult( '
Foo Bar
Foo
Bar
Foo Bar
Foo
Bar
Par1 Par2', '
' ); } function testNoParagraphBetweenListItem() { $this->assertResult( 'Par1
Par2
Bar
Par1a
Par2
' ); } function testAbsorbExtraEndingPTag() { $this->assertResult( 'Par1 Par2', 'Par1
Par2
' ); } function testAbsorbExtraEndingDivTag() { $this->assertResult( 'Par1 Par2', 'Par1
Par2
' ); } function testDoNotParagraphSingleSurroundingSpaceInBlockNode() { $this->assertResult( 'Par1
Par1
Par1
Par2
' ); } function testLeadingInlineNodeParagraph() { $this->assertResult( ' Foo', 'Foo
' ); } function testTrailingInlineNodeParagraph() { $this->assertResult( 'asdf
One Two
' ); } function testNoParagraphWithInlineRootNode() { $this->config->set('HTML.Parent', 'span'); $this->assertResult( 'Par Par2' ); } function testInlineAndBlockTagInDivNoParagraph() { $this->assertResult( 'bar
mmm asdf
bar
mmm
asdf
bar
mmm
asdf
bar
mmm
asdf
asdf bar
mmm
asdf
Testfoobarbingbang
boo
foo
foo
foo
foo
P
BooP
BooP
BooP
BooBaBar
Ba
Bar
Foo
Bar', 'Foo
Bar
' ); } function testAutoClose() { $this->assertResult( 'Foo
\n\n