Prepended constants with C_ to avoid reserved words as per https://www.php.net/manual...
[htmlpurifier/darkodev.git] / tests / HTMLPurifier / DefinitionCacheHarness.php
blob5c8fb2f4dd5bc39b4afa949384b233ba6f75dd97
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')
13 generate_mock_once('HTMLPurifier_Config');
14 $config = new HTMLPurifier_ConfigMock();
15 $config->returns('getBatchSerial', $serial, array('Test'));
16 $config->version = '1.0.0';
17 return $config;
20 /**
21 * Returns an anonymous def that has been setup and named Test
23 protected function generateDefinition($member_vars = array())
25 $def = new HTMLPurifier_DefinitionTestable();
26 $def->setup = true;
27 $def->type = 'Test';
28 foreach ($member_vars as $key => $val) {
29 $def->$key = $val;
31 return $def;
36 // vim: et sw=4 sts=4