Skip to content

Commit

Permalink
Fix outlines
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanjfshaw committed Mar 21, 2019
1 parent a6605da commit 3b2722a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/TestTraits/BehatProvidingTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Behat\Gherkin\Parser;
use Behat\Gherkin\Keywords\ArrayKeywords;
use Behat\Gherkin\Node\FeatureNode;
use Behat\Gherkin\Node\OutlineNode;

trait BehatProvidingTrait {

Expand Down Expand Up @@ -47,8 +48,8 @@ public function provideBehatFeature(FeatureNode $feature) {
$scenarios = [];
foreach ($feature->getScenarios() as $scenario) {
if ($scenario instanceof OutlineNode) {
foreach ($outline->getExamples() as $example) {
$scenarios[$example->getTitle()] = [$example, $feature];
foreach ($scenario->getExamples() as $index => $example) {
$scenarios[$scenario->getTitle() . ' #' . $index] = [$example, $feature];
}
}
else {
Expand Down

0 comments on commit 3b2722a

Please sign in to comment.