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:
@@ -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');
|
||||
|
Reference in New Issue
Block a user