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( 'Par1

Par2

', '

Par1

Par2

' ); $this->assertResult( 'Par1', '

Par1

' ); $this->assertResult( '
Par1

Par1
' ); $this->assertResult( 'Par1 ', '

Par1

' ); $this->assertResult( 'Par1
Par2
Par3', '

Par1

Par2

Par3

' ); $this->assertResult( 'Par1', '

Par1

' ); $this->assertResult( ' Par', '

Par

' ); $this->assertResult( ' Par ', '

Par

' ); $this->assertResult( '
Par1 Par2
', '

Par1

Par2

' ); $this->assertResult( '
Par1 Par2
', '

Par1

Par2

' ); $this->assertResult('
Par1
'); $this->assertResult( '
Par1 Par2
', '

Par1

Par2

' ); $this->assertResult( '
Par1

Par2
', true ); $this->assertResult( '

Foo Bar

', '

Foo

Bar

' ); $this->assertResult( '

Foo Bar

', '

Foo

Bar

' ); $this->assertResult( '
Foo
', '
Foo
' ); $this->assertResult( '
Par1 Par2
', '

Par1

Par2

' ); $this->assertResult( '', true ); $this->assertResult( '
Bar
', '

Bar

' ); $this->assertResult( 'Par1a Par2', '

Par1a

Par2

' ); $this->assertResult( 'Par1 Par2

', '

Par1

Par2

' ); $this->assertResult( 'Par1 Par2', '

Par1

Par2

' ); $this->assertResult( '
Par1
', true ); $this->assertResult( '
Par1
Par2
', '

Par1

Par2
' ); $this->assertResult( '
Par1
Par2
', '

Par1

Par2
' ); $this->assertResult( 'Par1
Par2
', '

Par1

Par2
' ); $this->assertResult( 'Par1 Par2', '

Par1

Par2

' ); } 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')); } }