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

[1.7.0] Implement Cleanup decorator

- Create generic DecoratorHarness
- Name decorators, so that they can be overridden or removed
- Add setup function to definition cache factory

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1118 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-05-29 20:49:33 +00:00
parent 002395de09
commit e2a951420f
10 changed files with 161 additions and 26 deletions

View File

@@ -0,0 +1,26 @@
<?php
require_once 'HTMLPurifier/DefinitionCacheHarness.php';
require_once 'HTMLPurifier/DefinitionCache/Decorator/Memory.php';
generate_mock_once('HTMLPurifier_DefinitionCache');
class HTMLPurifier_DefinitionCache_DecoratorHarness extends HTMLPurifier_DefinitionCacheHarness
{
function setup() {
$this->mock =& new HTMLPurifier_DefinitionCacheMock($this);
$this->mock->type = 'Test';
$this->cache = $this->cache->decorate($this->mock);
$this->def = $this->generateDefinition();
$this->config = $this->generateConfigMock();
}
function teardown() {
unset($this->mock);
unset($this->cache);
}
}
?>