From b19bf89016f310780c8c92d793720cbbbd19751a Mon Sep 17 00:00:00 2001 From: Thierry THONGKHAM Date: Mon, 2 Nov 2015 10:25:39 +0100 Subject: [PATCH] [FEATURE#22352] Soucis avec phing avec le TimeProfiler - Pour un `composer phing`, on check pas le `max_time` --- src/TimeProfiler.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/TimeProfiler.php b/src/TimeProfiler.php index 754980a..f7ada16 100644 --- a/src/TimeProfiler.php +++ b/src/TimeProfiler.php @@ -28,8 +28,10 @@ public function stopTimeProfiler($event) { $now = round(microtime(true) * 1000); $diff = $now - self::$last_time; - if ( $diff > self::$max_time) { - echo "{$event->getScenario()->getFile()}:{$event->getScenario()->getLine()}\n"; + if (false === isset(self::$_parameters['enableCodeCoverage']) && $diff > self::$max_time) { + if (get_class($event) !== 'Behat\Behat\Event\OutlineExampleEvent') { + echo "{$event->getScenario()->getFile()}:{$event->getScenario()->getLine()}\n"; + } throw new PendingException("Request too long {$diff}ms > " . self::$max_time . "ms \n"); } }