1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-30 19:00:10 +02:00

[3.1.0] Landed modified patch by Braden Anderson for %CSS.AllowedProperties

- Fix broken ConfigSchema build, as well as broken aliases
- Remove another advisory property from runtime ConfigSchema classes
- Reorder flush script to more accurately reflect dependencies
- Remove some aliases from unit tests

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1635 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2008-03-30 21:44:16 +00:00
parent 9f2f6c3166
commit 51cbb72649
13 changed files with 84 additions and 18 deletions

View File

@@ -45,21 +45,21 @@ class HTMLPurifier_DefinitionCacheFactoryTest extends HTMLPurifier_Harness
}
function test_create_invalid() {
$this->config->set('Core', 'DefinitionCache', 'Invalid');
$this->config->set('Cache', 'DefinitionImpl', 'Invalid');
$this->expectError('Unrecognized DefinitionCache Invalid, using Serializer instead');
$cache = $this->factory->create('Test', $this->config);
$this->assertIsA($cache, 'HTMLPurifier_DefinitionCache_Serializer');
}
function test_null() {
$this->config->set('Core', 'DefinitionCache', null);
$this->config->set('Cache', 'DefinitionImpl', null);
$cache = $this->factory->create('Test', $this->config);
$this->assertEqual($cache, new HTMLPurifier_DefinitionCache_Null('Test'));
}
function test_register() {
generate_mock_once('HTMLPurifier_DefinitionCache');
$this->config->set('Core', 'DefinitionCache', 'TestCache');
$this->config->set('Cache', 'DefinitionImpl', 'TestCache');
$this->factory->register('TestCache', $class = 'HTMLPurifier_DefinitionCacheMock');
$cache = $this->factory->create('Test', $this->config);
$this->assertIsA($cache, $class);