summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-03-08 15:14:27 +0100
committerFlorian Pritz <bluewind@xinu.at>2015-03-08 15:14:27 +0100
commit5fa6b2110039670b2cd0504b95d54a79b272a299 (patch)
treebc0b1cac1e0b6638d11babbcced39984f45b9b79 /application
parent0b47f4e306337d5a420642bff0b2fb4b8c446a11 (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>
Diffstat (limited to 'application')
-rw-r--r--application/controllers/tools.php1
-rw-r--r--application/tests/Test.php2
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();
}