1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-08 15:16:54 +02:00

Convert all to new configuration get/set format.

Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
Edward Z. Yang
2009-02-19 19:17:49 -05:00
parent b107eec452
commit 86ca784da3
106 changed files with 504 additions and 815 deletions

View File

@@ -33,9 +33,9 @@ class HTMLPurifier_URIDefinitionTest extends HTMLPurifier_URIHarness
}
function test_setupMemberVariables_collisionPrecedenceIsHostBaseScheme() {
$this->config->set('URI', 'Host', $host = 'example.com');
$this->config->set('URI', 'Base', $base = 'http://sub.example.com/foo/bar.html');
$this->config->set('URI', 'DefaultScheme', 'ftp');
$this->config->set('URI.Host', $host = 'example.com');
$this->config->set('URI.Base', $base = 'http://sub.example.com/foo/bar.html');
$this->config->set('URI.DefaultScheme', 'ftp');
$def = new HTMLPurifier_URIDefinition();
$def->setup($this->config);
$this->assertIdentical($def->host, $host);
@@ -44,14 +44,14 @@ class HTMLPurifier_URIDefinitionTest extends HTMLPurifier_URIHarness
}
function test_setupMemberVariables_onlyScheme() {
$this->config->set('URI', 'DefaultScheme', 'ftp');
$this->config->set('URI.DefaultScheme', 'ftp');
$def = new HTMLPurifier_URIDefinition();
$def->setup($this->config);
$this->assertIdentical($def->defaultScheme, 'ftp');
}
function test_setupMemberVariables_onlyBase() {
$this->config->set('URI', 'Base', 'http://sub.example.com/foo/bar.html');
$this->config->set('URI.Base', 'http://sub.example.com/foo/bar.html');
$def = new HTMLPurifier_URIDefinition();
$def->setup($this->config);
$this->assertIdentical($def->host, 'sub.example.com');