3 class HTMLPurifier_Strategy_MakeWellFormed_EndRewindInjectorTest
extends HTMLPurifier_StrategyHarness
5 public function setUp()
8 $this->obj
= new HTMLPurifier_Strategy_MakeWellFormed();
9 $this->config
->set('AutoFormat.Custom', array(
10 new HTMLPurifier_Strategy_MakeWellFormed_EndRewindInjector()
13 public function testBasic()
15 $this->assertResult('');
17 public function testFunction()
19 $this->assertResult('<span>asdf</span>','');
21 public function testFailedFunction()
23 $this->assertResult('<span>asd<b>asdf</b>asdf</span>','<span><b></b></span>');
25 public function testPadded()
27 $this->assertResult('<b></b><span>asdf</span><b></b>','<b></b><b></b>');
29 public function testDoubled()
31 $this->config
->set('AutoFormat.Custom', array(
32 new HTMLPurifier_Strategy_MakeWellFormed_EndRewindInjector(),
33 new HTMLPurifier_Strategy_MakeWellFormed_EndRewindInjector(),
35 $this->assertResult('<b></b><span>asdf</span>', '<b></b>');