diff options
author | Florian Pritz <bluewind@xinu.at> | 2015-03-08 15:14:27 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2015-03-08 15:14:27 +0100 |
commit | 5fa6b2110039670b2cd0504b95d54a79b272a299 (patch) | |
tree | bc0b1cac1e0b6638d11babbcced39984f45b9b79 | |
parent | 0b47f4e306337d5a420642bff0b2fb4b8c446a11 (diff) |
test: Fail on exceptions
If we don't output a test plan prove will consider the test failed. The
destructor would run when an uncaught exception is thrown so don't use
a destructor to output the testplan.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | application/controllers/tools.php | 1 | ||||
-rw-r--r-- | application/tests/Test.php | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/application/controllers/tools.php b/application/controllers/tools.php index e36b09b79..e226b1815 100644 --- a/application/controllers/tools.php +++ b/application/controllers/tools.php @@ -82,5 +82,6 @@ class Tools extends MY_Controller { $test->cleanup(); } } + $test->done_testing(); } } diff --git a/application/tests/Test.php b/application/tests/Test.php index e18aa9374..1f2e4fefa 100644 --- a/application/tests/Test.php +++ b/application/tests/Test.php @@ -102,7 +102,7 @@ abstract class Test { { } - public function __destruct() + public function done_testing() { $this->t->done_testing(); } |