Fix autoparagraph bug with non-inline elements.
[htmlpurifier.git] / tests / HTMLPurifier / Strategy / CoreTest.php
blob9bca5f60a09984b61b8867007727c77efcba4e84
1 <?php
3 class HTMLPurifier_Strategy_CoreTest extends HTMLPurifier_StrategyHarness
6 function setUp() {
7 parent::setUp();
8 $this->obj = new HTMLPurifier_Strategy_Core();
11 function testBlankInput() {
12 $this->assertResult('');
15 function testMakeWellFormed() {
16 $this->assertResult(
17 '<b>Make well formed.',
18 '<b>Make well formed.</b>'
22 function testFixNesting() {
23 $this->assertResult(
24 '<b><div>Fix nesting.</div></b>',
25 '<b></b><div><b>Fix nesting.</b></div><b></b>'
29 function testRemoveForeignElements() {
30 $this->assertResult(
31 '<asdf>Foreign element removal.</asdf>',
32 'Foreign element removal.'
36 function testFirstThree() {
37 $this->assertResult(
38 '<foo><b><div>All three.</div></b>',
39 '<b></b><div><b>All three.</b></div><b></b>'
45 // vim: et sw=4 sts=4