2007-01-21 04:37:02 +00:00
|
|
|
<?php
|
|
|
|
|
2007-02-17 19:37:48 +00:00
|
|
|
function tally_errors($test) {
|
2007-01-21 04:37:02 +00:00
|
|
|
// 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
|
2007-03-24 01:24:38 +00:00
|
|
|
$e[0]->_dumper = new SimpleDumper();
|
2007-02-17 19:37:48 +00:00
|
|
|
$test->fail('Error expectation not fulfilled: ' .
|
2007-01-21 04:37:02 +00:00
|
|
|
$e[0]->testMessage(null));
|
|
|
|
}
|
|
|
|
$queue->_expectation_queue = array();
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|