3 class HTMLPurifier_DefinitionCache_DecoratorTest
extends HTMLPurifier_DefinitionCacheHarness
8 generate_mock_once('HTMLPurifier_DefinitionCache');
9 $mock = new HTMLPurifier_DefinitionCacheMock();
12 $cache = new HTMLPurifier_DefinitionCache_Decorator();
13 $cache = $cache->decorate($mock);
15 $this->assertIdentical($cache->type
, $mock->type
);
17 $def = $this->generateDefinition();
18 $config = $this->generateConfigMock();
20 $mock->expectOnce('add', array($def, $config));
21 $cache->add($def, $config);
23 $mock->expectOnce('set', array($def, $config));
24 $cache->set($def, $config);
26 $mock->expectOnce('replace', array($def, $config));
27 $cache->replace($def, $config);
29 $mock->expectOnce('get', array($config));
32 $mock->expectOnce('flush', array($config));
33 $cache->flush($config);
35 $mock->expectOnce('cleanup', array($config));
36 $cache->cleanup($config);