diff --git a/src/Teststatistics.php b/src/Teststatistics.php index 414e5b2..c91f901 100644 --- a/src/Teststatistics.php +++ b/src/Teststatistics.php @@ -39,11 +39,19 @@ public function _initialize() static $events = array( Events::TEST_BEFORE => 'beforeTest', Events::TEST_END => 'afterTest', + Events::SUITE_BEFORE => 'beforeSuite', Events::SUITE_AFTER => 'afterSuite', Events::STEP_BEFORE => 'beforeStep', Events::STEP_AFTER => 'afterStep' ); + // reset times and not performant tests arrays, in case multiple suites are launched + public function beforeSuite(SuiteEvent $e) + { + self::$testTimes = array(); + self::$notPerformantStepsByTest = array(); + } + // we are printing test status and time taken public function beforeTest(TestEvent $e) {