PSR-2 reformatting PHPDoc corrections
[htmlpurifier.git] / tests / HTMLPurifier / Strategy / MakeWellFormed / EndInsertInjectorTest.php
blobef0ca0455fcee350dd060cfb0a0acdc6af834ec7
1 <?php
3 class HTMLPurifier_Strategy_MakeWellFormed_EndInsertInjectorTest 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_EndInsertInjector()
11 ));
13 public function testEmpty()
15 $this->assertResult('');
17 public function testNormal()
19 $this->assertResult('<i>Foo</i>', '<i>Foo<b>Comment</b></i>');
21 public function testEndOfDocumentProcessing()
23 $this->assertResult('<i>Foo', '<i>Foo<b>Comment</b></i>');
25 public function testDoubleEndOfDocumentProcessing()
27 $this->assertResult('<i><i>Foo', '<i><i>Foo<b>Comment</b></i><b>Comment</b></i>');
29 public function testEndOfNodeProcessing()
31 $this->assertResult('<div><i>Foo</div>asdf', '<div><i>Foo<b>Comment</b></i></div><i>asdf<b>Comment</b></i>');
33 public function testEmptyToStartEndProcessing()
35 $this->assertResult('<i />', '<i><b>Comment</b></i>');
37 public function testSpuriousEndTag()
39 $this->assertResult('</i>', '');
41 public function testLessButStillSpuriousEndTag()
43 $this->assertResult('<div></i></div>', '<div></div>');
47 // vim: et sw=4 sts=4