From 00e029f574f09e47f059d314d35392ecde3d9092 Mon Sep 17 00:00:00 2001 From: Will Morgan Date: Thu, 4 Dec 2014 14:48:10 +0000 Subject: [PATCH] FIX check for suite existence in endCurrentTest When using data providers with tests, the reporter appears to get confused and run callbacks in a weird order. This checks that the current suite before adding more details. --- dev/SapphireTestReporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/SapphireTestReporter.php b/dev/SapphireTestReporter.php index f27e84e0c..b658b8f67 100644 --- a/dev/SapphireTestReporter.php +++ b/dev/SapphireTestReporter.php @@ -242,7 +242,7 @@ class SapphireTestReporter implements PHPUnit_Framework_TestListener { * Cleanly end the current test */ protected function endCurrentTest() { - if(!$this->currentTest) return; + if(!$this->currentTest || !$this->currentSuite) return; // Time the current test $testDuration = microtime(true) - $this->startTestTime;