PSR-2 reformatting PHPDoc corrections
[htmlpurifier.git] / tests / HTMLPurifier / ChildDef / ChameleonTest.php
blob1a751395c038f9820b30c3f1086b08b0b3bd4f3f
1 <?php
3 class HTMLPurifier_ChildDef_ChameleonTest extends HTMLPurifier_ChildDefHarness
6 protected $isInline;
8 public function setUp()
10 parent::setUp();
11 $this->obj = new HTMLPurifier_ChildDef_Chameleon(
12 'b | i', // allowed only when in inline context
13 'b | i | div' // allowed only when in block context
15 $this->context->register('IsInline', $this->isInline);
18 public function testInlineAlwaysAllowed()
20 $this->isInline = true;
21 $this->assertResult(
22 '<b>Allowed.</b>'
26 public function testBlockNotAllowedInInline()
28 $this->isInline = true;
29 $this->assertResult(
30 '<div>Not allowed.</div>', ''
34 public function testBlockAllowedInNonInline()
36 $this->isInline = false;
37 $this->assertResult(
38 '<div>Allowed.</div>'
44 // vim: et sw=4 sts=4