obj = new HTMLPurifier_ChildDef_StrictBlockquote('div | p'); } function testEmptyInput() { $this->assertResult(''); } function testPreserveValidP() { $this->assertResult('

Valid

'); } function testPreserveValidDiv() { $this->assertResult('
Still valid
'); } function testWrapTextWithP() { $this->assertResult('Needs wrap', '

Needs wrap

'); } function testNoWrapForWhitespaceOrValidElements() { $this->assertResult('

Do not wrap

Whitespace

'); } function testWrapTextNextToValidElements() { $this->assertResult( 'Wrap'. '

Do not wrap

', '

Wrap

Do not wrap

' ); } function testWrapInlineElements() { $this->assertResult( '

Do not

'.'Wrap', '

Do not

Wrap

' ); } function testWrapAndRemoveInvalidTags() { $this->assertResult( '
  • Not allowed
  • Paragraph.

    Hmm.

    ', '

    Not allowedParagraph.

    Hmm.

    ' ); } function testWrapComplicatedSring() { $this->assertResult( $var = 'He said
    perhaps
    we should nuke them.', "

    $var

    " ); } function testWrapAndRemoveInvalidTagsComplex() { $this->assertResult( 'BarPeopleConniving.'. '

    Fools!

    ', '

    Bar'. 'PeopleConniving.

    Fools!

    ' ); } function testAlternateWrapper() { $this->config->set('HTML', 'BlockWrapper', 'div'); $this->assertResult('Needs wrap', '
    Needs wrap
    '); } function testError() { $this->obj = new HTMLPurifier_ChildDef_StrictBlockquote('div | p'); $this->config->set('HTML', 'BlockWrapper', 'dav'); $this->assertResult('Needs wrap', '

    Needs wrap

    '); } }