mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Fixed TestRunner to let PHPUnit take care of errors in tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@54625 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
8e31456185
commit
edeb7cf4cc
@ -82,6 +82,10 @@ class TestRunner extends Controller {
|
|||||||
echo "</div>";
|
echo "</div>";
|
||||||
echo '<div class="trace">';
|
echo '<div class="trace">';
|
||||||
echo "<pre>";
|
echo "<pre>";
|
||||||
|
|
||||||
|
// Remove our error handler so that PHP can use its own
|
||||||
|
restore_error_handler();
|
||||||
|
|
||||||
$suite = new PHPUnit_Framework_TestSuite();
|
$suite = new PHPUnit_Framework_TestSuite();
|
||||||
foreach($classList as $className) {
|
foreach($classList as $className) {
|
||||||
// Ensure that the autoloader pulls in the test class, as PHPUnit won't know how to do this.
|
// Ensure that the autoloader pulls in the test class, as PHPUnit won't know how to do this.
|
||||||
@ -92,6 +96,10 @@ class TestRunner extends Controller {
|
|||||||
/*, array("reportDirectory" => "/Users/sminnee/phpunit-report")*/
|
/*, array("reportDirectory" => "/Users/sminnee/phpunit-report")*/
|
||||||
PHPUnit_TextUI_TestRunner::run($suite);
|
PHPUnit_TextUI_TestRunner::run($suite);
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
|
// Put the error handlers back
|
||||||
|
Debug::loadErrorHandlers();
|
||||||
|
|
||||||
self::$default_reporter->writeFooter();
|
self::$default_reporter->writeFooter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user