mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-08 14:58:42 +00:00
17d32bac7f
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@870 48356398-32a2-884e-a903-53898d9a118a
18 lines
585 B
PHP
18 lines
585 B
PHP
<?php
|
|
|
|
function tally_errors($test) {
|
|
// BRITTLE: relies on private code to work
|
|
$context = &SimpleTest::getContext();
|
|
$queue = &$context->get('SimpleErrorQueue');
|
|
if (!isset($queue->_expectation_queue)) return; // fut-compat
|
|
foreach ($queue->_expectation_queue as $e) {
|
|
if (count($e) != 2) return; // fut-compat
|
|
if (!isset($e[0])) return; // fut-compat
|
|
$e[0]->_dumper = new SimpleDumper();
|
|
$test->fail('Error expectation not fulfilled: ' .
|
|
$e[0]->testMessage(null));
|
|
}
|
|
$queue->_expectation_queue = array();
|
|
}
|
|
|
|
?>
|