0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-03-11 17:18:44 +00:00

Avoid doing stupidly clever reflection tricks that make old PHP versions sad.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
Edward Z. Yang 2012-01-18 18:21:36 -05:00
parent 56a26cab14
commit 5c5e3fe79f

View File

@ -220,7 +220,7 @@ class HTMLPurifier_ConfigTest extends HTMLPurifier_Harness
$def = $config->getHTMLDefinition();
$def2 = $config->getHTMLDefinition();
$this->assertIsA($def, 'HTMLPurifier_HTMLDefinition');
$this->assertSame($def, $def2);
$this->assertTrue($def === $def2);
$this->assertTrue($def->setup);
$old_def = clone $def2;
@ -228,7 +228,7 @@ class HTMLPurifier_ConfigTest extends HTMLPurifier_Harness
$config->set('HTML.Doctype', 'HTML 4.01 Transitional');
$def = $config->getHTMLDefinition();
$this->assertIsA($def, 'HTMLPurifier_HTMLDefinition');
$this->assertNotEqual($def, $old_def);
$this->assertTrue($def !== $old_def);
$this->assertTrue($def->setup);
}
@ -491,7 +491,7 @@ class HTMLPurifier_ConfigTest extends HTMLPurifier_Harness
$config = HTMLPurifier_Config::createDefault();
$config->set('HTML.Allowed', 'a');
$config2 = unserialize($config->serialize());
$this->assertIdentical($config, $config2);
$this->assertIdentical($config->get('HTML.Allowed'), $config2->get('HTML.Allowed'));
}
function testDefinitionCachingNothing() {