config = array('AutoFormat.AutoParagraph' => true); } function test() { $this->assertResult( 'Foobar', '
Foobar
' ); $this->assertResult( 'Par 1 Par 1 still', 'Par 1 Par 1 still
' ); $this->assertResult( 'Par1 Par2', 'Par1
Par2
' ); $this->assertResult( 'Par1 Par2', 'Par1
Par2
' ); $this->assertResult( 'Par1 Par2', 'Par1
Par2
' ); $this->assertResult( 'Par1 Par2', 'Par1 Par2
' ); $this->assertResult( 'Par1Par2
', 'Par1
Par2
' ); $this->assertResult( 'Par1', 'Par1
' ); $this->assertResult( 'Par1 Par1' ); $this->assertResult( 'Par1 ', '
Par1
' ); $this->assertResult( 'Par1Par1
Par3
' ); $this->assertResult( 'Par1', 'Par1
' ); $this->assertResult( ' Par', 'Par
' ); $this->assertResult( ' Par ', 'Par
' ); $this->assertResult( 'Par1
Par2
Par1
Par2
Par1
Par2
Par1 Par2', true ); $this->assertResult( '
Foo Bar
Foo
Bar
Foo Bar
Foo
Bar
Par1 Par2', '
' ); $this->assertResult( 'Par1
Par2
Bar
Par1a
Par2
' ); $this->assertResult( 'Par1 Par2', 'Par1
Par2
' ); $this->assertResult( 'Par1 Par2', 'Par1
Par2
' ); $this->assertResult( 'Par1
Par1
Par1
Par1
Par2
' ); $this->assertResult( ' Foo', 'Foo
' ); $this->assertResult( 'asdf
One Two
' ); } function testInlineRootNode() { $this->assertResult( 'Par Par2', true, array('AutoFormat.AutoParagraph' => true, 'HTML.Parent' => 'span') ); } function testNeeded() { $this->expectError('Cannot enable AutoParagraph injector because p is not allowed'); $this->assertResult('foobar', true, array('AutoFormat.AutoParagraph' => true, 'HTML.Allowed' => 'b')); } }