mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-02 12:21:09 +02:00
Convert all to new configuration get/set format.
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
@@ -5,9 +5,9 @@ class HTMLPurifier_HTMLModule_FormsTest extends HTMLPurifier_HTMLModuleHarness
|
||||
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
$this->config->set('HTML', 'Trusted', true);
|
||||
$this->config->set('Attr', 'EnableID', true);
|
||||
$this->config->set('Cache', 'DefinitionImpl', null);
|
||||
$this->config->set('HTML.Trusted', true);
|
||||
$this->config->set('Attr.EnableID', true);
|
||||
$this->config->set('Cache.DefinitionImpl', null);
|
||||
}
|
||||
|
||||
function testBasicUse() {
|
||||
|
@@ -23,7 +23,7 @@ class HTMLPurifier_HTMLModule_ImageTest extends HTMLPurifier_HTMLModuleHarness
|
||||
}
|
||||
|
||||
function testLengthCustomMax() {
|
||||
$this->config->set('HTML', 'MaxImgLength', 20);
|
||||
$this->config->set('HTML.MaxImgLength', 20);
|
||||
$this->assertResult(
|
||||
'<img height="30" width="30" src="" alt="" />',
|
||||
'<img height="20" width="20" src="" alt="" />'
|
||||
@@ -31,7 +31,7 @@ class HTMLPurifier_HTMLModule_ImageTest extends HTMLPurifier_HTMLModuleHarness
|
||||
}
|
||||
|
||||
function testLengthCrashFixDisabled() {
|
||||
$this->config->set('HTML', 'MaxImgLength', null);
|
||||
$this->config->set('HTML.MaxImgLength', null);
|
||||
$this->assertResult(
|
||||
'<img height="100%" width="100%" src="" alt="" />'
|
||||
);
|
||||
@@ -41,7 +41,7 @@ class HTMLPurifier_HTMLModule_ImageTest extends HTMLPurifier_HTMLModuleHarness
|
||||
}
|
||||
|
||||
function testLengthTrusted() {
|
||||
$this->config->set('HTML', 'Trusted', true);
|
||||
$this->config->set('HTML.Trusted', true);
|
||||
$this->assertResult(
|
||||
'<img height="100%" width="100%" src="" alt="" />'
|
||||
);
|
||||
|
@@ -5,11 +5,11 @@ class HTMLPurifier_HTMLModule_ObjectTest extends HTMLPurifier_HTMLModuleHarness
|
||||
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
$this->config->set('HTML', 'Trusted', true);
|
||||
$this->config->set('HTML.Trusted', true);
|
||||
}
|
||||
|
||||
function testDefaultRemoval() {
|
||||
$this->config->set('HTML', 'Trusted', false);
|
||||
$this->config->set('HTML.Trusted', false);
|
||||
$this->assertResult(
|
||||
'<object></object>', ''
|
||||
);
|
||||
|
@@ -5,7 +5,7 @@ class HTMLPurifier_HTMLModule_ProprietaryTest extends HTMLPurifier_HTMLModuleHar
|
||||
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
$this->config->set('HTML', 'Proprietary', true);
|
||||
$this->config->set('HTML.Proprietary', true);
|
||||
}
|
||||
|
||||
function testMarquee() {
|
||||
|
@@ -5,7 +5,7 @@ class HTMLPurifier_HTMLModule_RubyTest extends HTMLPurifier_HTMLModuleHarness
|
||||
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
$this->config->set('HTML', 'Doctype', 'XHTML 1.1');
|
||||
$this->config->set('HTML.Doctype', 'XHTML 1.1');
|
||||
}
|
||||
|
||||
function testBasicUse() {
|
||||
|
@@ -5,7 +5,7 @@ class HTMLPurifier_HTMLModule_SafeEmbedTest extends HTMLPurifier_HTMLModuleHarne
|
||||
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
$this->config->set('HTML', 'DefinitionID', 'HTMLPurifier_HTMLModule_SafeEmbedTest');
|
||||
$this->config->set('HTML.DefinitionID', 'HTMLPurifier_HTMLModule_SafeEmbedTest');
|
||||
$def = $this->config->getHTMLDefinition(true);
|
||||
$def->manager->addModule('SafeEmbed');
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@ class HTMLPurifier_HTMLModule_SafeObjectTest extends HTMLPurifier_HTMLModuleHarn
|
||||
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
$this->config->set('HTML', 'DefinitionID', 'HTMLPurifier_HTMLModule_SafeObjectTest');
|
||||
$this->config->set('HTML.DefinitionID', 'HTMLPurifier_HTMLModule_SafeObjectTest');
|
||||
$def = $this->config->getHTMLDefinition(true);
|
||||
$def->manager->addModule('SafeObject');
|
||||
}
|
||||
|
@@ -5,12 +5,12 @@ class HTMLPurifier_HTMLModule_ScriptingTest extends HTMLPurifier_HTMLModuleHarne
|
||||
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
$this->config->set('HTML', 'Trusted', true);
|
||||
$this->config->set('Output', 'CommentScriptContents', false);
|
||||
$this->config->set('HTML.Trusted', true);
|
||||
$this->config->set('Output.CommentScriptContents', false);
|
||||
}
|
||||
|
||||
function testDefaultRemoval() {
|
||||
$this->config->set('HTML', 'Trusted', false);
|
||||
$this->config->set('HTML.Trusted', false);
|
||||
$this->assertResult(
|
||||
'<script type="text/javascript">foo();</script>', ''
|
||||
);
|
||||
|
Reference in New Issue
Block a user