Reapply patch to make tests always call teardown.

Upstream ticket:
  http://dev.kohanaphp.com/ticket/960
This commit is contained in:
Bharat Mediratta
2008-12-15 09:45:55 +00:00
parent 7b5713d485
commit b5e6f79f5f

View File

@@ -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