replace() 공개 메소드

public replace ( HTMLPurifier_Definition $def, HTMLPurifier_Config $config ) : integer | boolean
$def HTMLPurifier_Definition
$config HTMLPurifier_Config
리턴 integer | boolean
 function test_errors()
 {
     $cache = new HTMLPurifier_DefinitionCache_Serializer('Test');
     $def = $this->generateDefinition();
     $def->setup = true;
     $def->type = 'NotTest';
     $config = $this->generateConfigMock('testfoo');
     $this->expectError('Cannot use definition of type NotTest in cache for Test');
     $cache->add($def, $config);
     $this->expectError('Cannot use definition of type NotTest in cache for Test');
     $cache->set($def, $config);
     $this->expectError('Cannot use definition of type NotTest in cache for Test');
     $cache->replace($def, $config);
 }