summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/unit_test/libraries/Unit_Test.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/modules/unit_test/libraries/Unit_Test.php b/modules/unit_test/libraries/Unit_Test.php
index e6010d3c..54366cb7 100644
--- a/modules/unit_test/libraries/Unit_Test.php
+++ b/modules/unit_test/libraries/Unit_Test.php
@@ -136,8 +136,12 @@ class Unit_Test_Core {
$object->setup();
}
- // Run the actual test
- $object->$method_name();
+ $e = null;
+ try {
+
+ // Run the actual test
+ $object->$method_name();
+ } catch (Exception $e) { }
// Run teardown method
if ($teardown === TRUE)
@@ -145,6 +149,11 @@ class Unit_Test_Core {
$object->teardown();
}
+ if ($e) {
+ throw $e;
+ }
+
+
$this->stats[$class]['total']++;
// Test passed