mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-22 16:31:53 +00:00
002395de09
- Move serialization responsibility to Config - Create DefinitionCacheFactory - Implement Null definition cache git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1117 48356398-32a2-884e-a903-53898d9a118a
25 lines
839 B
PHP
25 lines
839 B
PHP
<?php
|
|
|
|
require_once 'HTMLPurifier/DefinitionCache.php';
|
|
|
|
class HTMLPurifier_DefinitionCacheTest extends UnitTestCase
|
|
{
|
|
|
|
function test_isOld() {
|
|
$cache = new HTMLPurifier_DefinitionCache('Test'); // non-functional
|
|
|
|
$config = HTMLPurifier_Config::createDefault();
|
|
$config->version = '1.0.0';
|
|
$config->revision = 10;
|
|
|
|
$this->assertIdentical($cache->isOld('1.0.0-10-hashstuffhere', $config), false);
|
|
$this->assertIdentical($cache->isOld('1.5.0-1-hashstuffhere', $config), false);
|
|
|
|
$this->assertIdentical($cache->isOld('0.9.0-1-hashstuffhere', $config), true);
|
|
$this->assertIdentical($cache->isOld('1.0.0-1-hashstuffhere', $config), true);
|
|
$this->assertIdentical($cache->isOld('1.0.0beta-11-hashstuffhere', $config), true);
|
|
}
|
|
|
|
}
|
|
|
|
?>
|