Fix newline issues in tests.
[htmlpurifier/darkodev.git] / tests / HTMLPurifier / DefinitionCacheHarness.php
blob6e737b5198cfe948180c367f114bb8ed79d5a48f
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;