Skip to content

Commit 8efcd01

Browse files
committed
Merge pull request #19 from zszucs/zszucs/add_index_to_examples_array
[zszucs]add index to failed tests if examples array is used
2 parents 0809e02 + 36aa19e commit 8efcd01

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Codeception/Specify.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ function specify($specification, \Closure $callable = null, $params = [])
4242
$throws = $this->getSpecifyExpectedException($params);
4343
$examples = $this->getSpecifyExamples($params);
4444

45-
foreach ($examples as $example) {
45+
foreach ($examples as $idx => $example) {
46+
$this->setName($name.' | '.$specification .' | examples index '. $idx);
4647
// copy current object properties
4748
$this->specifyCloneProperties($properties);
4849

0 commit comments

Comments
 (0)