0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-09-19 18:55:19 +00:00

Sync with SimpleTest codebase

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1701 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2008-04-28 19:52:13 +00:00
parent 4b862f64e6
commit aaf6ba421c

View File

@ -12,8 +12,8 @@ class HTMLPurifier_ErrorCollectorEMock extends HTMLPurifier_ErrorCollectorMock
private $_expected_context = array(); private $_expected_context = array();
private $_expected_context_at = array(); private $_expected_context_at = array();
public function prepare(&$context) { public function prepare($context) {
$this->_context =& $context; $this->_context = $context;
} }
public function expectContext($key, $value) { public function expectContext($key, $value) {
@ -27,13 +27,7 @@ class HTMLPurifier_ErrorCollectorEMock extends HTMLPurifier_ErrorCollectorMock
// test for context // test for context
$context = SimpleTest::getContext(); $context = SimpleTest::getContext();
$test = $context->getTest(); $test = $context->getTest();
$mock = $this->mock;
// compat
if (empty($this->_mock)) {
$mock = $this;
} else {
$mock = $this->_mock;
}
foreach ($this->_expected_context as $key => $value) { foreach ($this->_expected_context as $key => $value) {
$test->assertEqual($value, $this->_context->get($key)); $test->assertEqual($value, $this->_context->get($key));