obj = new HTMLPurifier_ChildDef_Chameleon( 'b | i', // allowed only when in inline context 'b | i | div' // allowed only when in block context ); $this->assertResult( 'Allowed.', true, array(), array('IsInline' => true) ); $this->assertResult( '
Not allowed.
', '', array(), array('IsInline' => true) ); $this->assertResult( '
Allowed.
', true, array(), array('IsInline' => false) ); } }