Skip to content

Commit

Permalink
Bug Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenGillCoop committed Aug 29, 2023
1 parent 42b11c0 commit d4dd7d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GherkinProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private function checkForMissingSteps($scenarioObject, array $testFileStepsArray

// But check if has $data and update it accordingly? (Just like datasets and description)
$stepArguments = $scenarioStepObject->getArguments();
if($stepArguments[0] instanceof TableNode) {
if(array_key_exists(0, $stepArguments) && $stepArguments[0] instanceof TableNode) {

$r = $this->removeExistingDataFromStep($y, $editedTestFileLines);
$stepArgumentsData = $this->pestCreator->writeStepArgumentTable($stepArguments);
Expand All @@ -202,7 +202,7 @@ private function checkForMissingSteps($scenarioObject, array $testFileStepsArray
$this->outputHandler->stepIsNotInTest($scenarioStepObject->getText(), $testFilename);
$this->errors++;

$result = $this->pestCreator->writeStep($testFilename, $scenarioObject->getTitle(), $scenarioStepObject->getText());
$result = $this->pestCreator->writeStep($testFilename, $scenarioObject->getTitle(), $scenarioStepObject->getText(), $scenarioStepObject->getArguments());
$tempAddition = array_merge($tempAddition, $result);

}
Expand Down

0 comments on commit d4dd7d0

Please sign in to comment.