Convert all to new configuration get/set format.
[htmlpurifier/darkodev.git] / tests / HTMLPurifier / DefinitionCacheHarness.php
blobab3cef451f22a5595974305f07869f69db364563
1 <?php
3 class HTMLPurifier_DefinitionCacheHarness extends HTMLPurifier_Harness
6 /**
7 * Generate a configuration mock object that returns $values
8 * to a getBatch() call
9 * @param $values Values to return when getBatch is invoked
11 protected function generateConfigMock($serial = 'defaultserial') {
12 generate_mock_once('HTMLPurifier_Config');
13 $config = new HTMLPurifier_ConfigMock();
14 $config->setReturnValue('getBatchSerial', $serial, array('Test'));
15 $config->version = '1.0.0';
16 return $config;
19 /**
20 * Returns an anonymous def that has been setup and named Test
22 protected function generateDefinition($member_vars = array()) {
23 $def = new HTMLPurifier_DefinitionTestable();
24 $def->setup = true;
25 $def->type = 'Test';
26 foreach ($member_vars as $key => $val) {
27 $def->$key = $val;
29 return $def;
34 // vim: et sw=4 sts=4