From 36aa19ebdcfeab2173f5ec70d54ba5d1846b59b1 Mon Sep 17 00:00:00 2001 From: zszucs Date: Thu, 1 Oct 2015 16:57:38 -0400 Subject: [PATCH] [zszucs]add index to failed tests if examples array is used --- src/Codeception/Specify.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Codeception/Specify.php b/src/Codeception/Specify.php index fdc3bc2..f0c2086 100644 --- a/src/Codeception/Specify.php +++ b/src/Codeception/Specify.php @@ -42,7 +42,8 @@ function specify($specification, \Closure $callable = null, $params = []) $throws = $this->getSpecifyExpectedException($params); $examples = $this->getSpecifyExamples($params); - foreach ($examples as $example) { + foreach ($examples as $idx => $example) { + $this->setName($name.' | '.$specification .' | examples index '. $idx); // copy current object properties $this->specifyCloneProperties($properties);