[Solar-svn] Revision 2674
pmjones at solarphp.com
pmjones at solarphp.com
Thu Aug 9 14:05:28 CDT 2007
Branch: Solar_Test_Suite: [CHG] Now catches all non-Test exceptions and reports them as failures, instead of interrupting the test execution.
Modified: branches/orm/Solar/Test/Suite.php
===================================================================
--- branches/orm/Solar/Test/Suite.php 2007-08-08 21:17:01 UTC (rev 2673)
+++ branches/orm/Solar/Test/Suite.php 2007-08-09 19:05:28 UTC (rev 2674)
@@ -299,7 +299,8 @@
$this->_done('todo', $class, $e->getMessage());
$this->_info['done'] += count($methods) - 1;
continue;
- } catch (Solar_Test_Exception_Fail $e) {
+ } catch (Exception $e) {
+ // catches Solar_Test_Exception_Fail and all others
$this->_info['done'] ++;
$this->_done('fail', $class, $e->getMessage(),
$e->__toString());
@@ -319,7 +320,6 @@
// run test method and check validity
try {
-
// turn on all error reporting
$reporting = ini_get('error_reporting');
ini_set('error_reporting', $this->_config['error_reporting']);
@@ -356,14 +356,15 @@
$this->_done('skip', $name, $e->getMessage());
} catch (Solar_Test_Exception_Todo $e) {
$this->_done('todo', $name, $e->getMessage());
- } catch (Solar_Test_Exception_Fail $e) {
+ } catch (Exception $e) {
+ // catches Solar_Test_Exception_Fail and all others
$this->_done('fail', $name, $e->getMessage(),
$e->__toString());
}
// method teardown
$test->teardown();
-
+
// reset the assertion counter for the next pass
$test->resetAssertCount();
}
More information about the Solar-svn
mailing list