From a0b991d7de4bfbcc823c113a8438142827bf7cba Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 5 Feb 2015 21:39:25 +0100 Subject: Make Test-More useable for our usecase Signed-off-by: Florian Pritz --- application/third_party/test-more-php/Test-Simple-OO.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'application/third_party/test-more-php/Test-Simple-OO.php') diff --git a/application/third_party/test-more-php/Test-Simple-OO.php b/application/third_party/test-more-php/Test-Simple-OO.php index e91a5645b..1d33eff2e 100755 --- a/application/third_party/test-more-php/Test-Simple-OO.php +++ b/application/third_party/test-more-php/Test-Simple-OO.php @@ -71,6 +71,7 @@ class TestSimple { protected $TestsRun = 0; protected $Skips; protected $NumberOfTests; + protected $CurrentTestNumber; protected $Filter; protected $notes; @@ -89,7 +90,7 @@ class TestSimple { $this->NumberOfTests = $NumberOfTests; $this->SkipAllReason = $SkipReason; $this->diag("Skipping all tests: $SkipReason"); - exit(); + return; } // Return current value if no params passed (query to the plan) @@ -174,7 +175,7 @@ class TestSimple { function done_testing () { // Change of plans (if there was one in the first place) $this->plan((int)$this->TestsRun); - exit(); + return; } function bail ($message = '') { @@ -184,7 +185,7 @@ class TestSimple { static function _bail ($message = '') { echo "Bail out! $message\n"; - exit(255); + throw new RuntimeException("Bail out! $message"); } function diag() { @@ -217,7 +218,7 @@ class TestSimple { if ($this->Filter) ob_end_flush(); $retval = ($this->Results['Failed'] > 254) ? 254 : $this->Results['Failed']; - exit($retval); + return; } function web_output($callback = NULL) { -- cgit v1.2.3-24-g4f1b