mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-06 06:07:26 +02:00
[1.4.0] Revamp ConfigTest.php. Factor out tallyErrors() to its own function.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@671 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
18
tests/tally_errors.func.php
Normal file
18
tests/tally_errors.func.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
function tally_errors() {
|
||||
// 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();
|
||||
$this->fail('Error expectation not fulfilled: ' .
|
||||
$e[0]->testMessage(null));
|
||||
}
|
||||
$queue->_expectation_queue = array();
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user