config->set ( 'AutoFormat.AutoParagraph', true ); } public function testSingleParagraph() { $this->assertResult ( 'Foobar', '
Foobar
' ); } public function testSingleMultiLineParagraph() { $this->assertResult ( 'Par 1 Par 1 still', 'Par 1 Par 1 still
' ); } public function testTwoParagraphs() { $this->assertResult ( 'Par1 Par2', "Par1
Par2
" ); } public function testTwoParagraphsWithLotsOfSpace() { $this->assertResult ( 'Par1 Par2', 'Par1
Par2
' ); } public function testTwoParagraphsWithInlineElements() { $this->assertResult ( 'Par1 Par2', 'Par1
Par2
' ); } public function testSingleParagraphThatLooksLikeTwo() { $this->assertResult ( 'Par1 Par2', 'Par1 Par2
' ); } public function testAddParagraphAdjacentToParagraph() { $this->assertResult ( 'Par1Par2
', 'Par1
Par2
' ); } public function testParagraphUnclosedInlineElement() { $this->assertResult ( 'Par1', 'Par1
' ); } public function testPreservePreTags() { $this->assertResult ( 'Par1 Par1' ); } public function testIgnoreTrailingWhitespace() { $this->assertResult ( 'Par1 ', '
Par1
' ); } public function testDoNotParagraphBlockElements() { $this->assertResult ( 'Par1Par1
Par3
' ); } public function testParagraphTextAndInlineNodes() { $this->assertResult ( 'Par1', 'Par1
' ); } public function testPreserveLeadingWhitespace() { $this->assertResult ( ' Par', 'Par
' ); } public function testPreserveSurroundingWhitespace() { $this->assertResult ( ' Par ', 'Par
' ); } public function testParagraphInsideBlockNode() { $this->assertResult ( 'Par1
Par2
Par1
Par2
Par1
Par2
Par1 Par2' ); } public function testSplitUpInternalsOfPTagInBlockNode() { $this->assertResult ( '
Foo Bar
Foo
Bar
Foo Bar
Foo
Bar
Par1 Par2', '
' ); } public function testNoParagraphBetweenListItem() { $this->assertResult ( 'Par1
Par2
Bar
Par1a
Par2
' ); } public function testAbsorbExtraEndingPTag() { $this->assertResult ( 'Par1 Par2', 'Par1
Par2
' ); } public function testAbsorbExtraEndingDivTag() { $this->assertResult ( 'Par1 Par2', 'Par1
Par2
' ); } public function testDoNotParagraphSingleSurroundingSpaceInBlockNode() { $this->assertResult ( 'Par1
Par1
Par1
Par2
' ); } public function testLeadingInlineNodeParagraph() { $this->assertResult ( ' Foo', 'Foo
' ); } public function testTrailingInlineNodeParagraph() { $this->assertResult ( 'asdf
One Two
' ); } public function testNoParagraphWithInlineRootNode() { $this->config->set ( 'HTML.Parent', 'span' ); $this->assertResult ( 'Par Par2' ); } public 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
' ); } public function testAutoClose() { $this->assertResult ( 'Foo
\n\n