1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-05 21:57:26 +02:00

[1.7.0] Add versioning to serializer cache

- Make some AttrDef member-variables lazy-loading to save serialization space, clean up others
- Refactor get*Definition() methods

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1116 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-05-29 18:19:42 +00:00
parent 426fbd1f97
commit d1187ed331
11 changed files with 169 additions and 71 deletions

View File

@@ -8,10 +8,12 @@ class HTMLPurifier_DefinitionCacheHarness extends UnitTestCase
* to a getBatch() call
* @param $values Values to return when getBatch is invoked
*/
function generateConfigMock($values) {
function generateConfigMock($values = array()) {
generate_mock_once('HTMLPurifier_Config');
$config = new HTMLPurifier_ConfigMock($this);
$config->setReturnValue('getBatch', $values, array('Test'));
$config->version = '1.0.0';
$config->revision = 1;
return $config;
}