PSR-2 reformatting PHPDoc corrections
[htmlpurifier.git] / tests / HTMLPurifier / Strategy / MakeWellFormed / EndRewindInjectorTest.php
blob7fe7790faf69e36f6297af49e38d931e133f2109
1 <?php
3 class HTMLPurifier_Strategy_MakeWellFormed_EndRewindInjectorTest extends HTMLPurifier_StrategyHarness
5 public function setUp()
7 parent::setUp();
8 $this->obj = new HTMLPurifier_Strategy_MakeWellFormed();
9 $this->config->set('AutoFormat.Custom', array(
10 new HTMLPurifier_Strategy_MakeWellFormed_EndRewindInjector()
11 ));
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(),
34 ));
35 $this->assertResult('<b></b><span>asdf</span>', '<b></b>');
39 // vim: et sw=4 sts=4