Fix autoparagraph bug with non-inline elements.
[htmlpurifier.git] / tests / HTMLPurifier / Strategy / RemoveForeignElements_TidyTest.php
blob22fc456a7209f0e36678fca7c6a2b85eb77b32df
1 <?php
3 class HTMLPurifier_Strategy_RemoveForeignElements_TidyTest
4 extends HTMLPurifier_StrategyHarness
7 function setUp() {
8 parent::setUp();
9 $this->obj = new HTMLPurifier_Strategy_RemoveForeignElements();
10 $this->config->set('HTML.TidyLevel', 'heavy');
13 function testCenterTransform() {
14 $this->assertResult(
15 '<center>Look I am Centered!</center>',
16 '<div style="text-align:center;">Look I am Centered!</div>'
20 function testFontTransform() {
21 $this->assertResult(
22 '<font color="red" face="Arial" size="6">Big Warning!</font>',
23 '<span style="color:red;font-family:Arial;font-size:xx-large;">Big'.
24 ' Warning!</span>'
28 function testTransformToForbiddenElement() {
29 $this->config->set('HTML.Allowed', 'div');
30 $this->assertResult(
31 '<font color="red" face="Arial" size="6">Big Warning!</font>',
32 'Big Warning!'
36 function testMenuTransform() {
37 $this->assertResult(
38 '<menu><li>Item 1</li></menu>',
39 '<ul><li>Item 1</li></ul>'
45 // vim: et sw=4 sts=4