Skip to content

Commit 064f690

Browse files
committed
MQE-1184: Describe which entity reference fails in generate:tests
- Updated Exception verbosity
1 parent 12d1f63 commit 064f690

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Magento/FunctionalTestingFramework/Test/Objects/ActionObject.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,8 @@ private function findAndReplaceReferences($objectHandler, $inputString)
522522
list(,$objField) = $this->stripAndSplitReference($match);
523523
if ($obj->getElement($objField) == null) {
524524
throw new TestReferenceException(
525-
"Could not resolve entity reference \"{$inputString}\" in action \"{$this->getStepKey()}\"",
525+
"Could not resolve entity reference \"{$inputString}\" "
526+
. "in Action with stepKey \"{$this->getStepKey()}\"",
526527
["input" => $inputString, "stepKey" => $this->getStepKey()]
527528
);
528529
}
@@ -542,7 +543,8 @@ private function findAndReplaceReferences($objectHandler, $inputString)
542543
return $this->findAndReplaceReferences(DataObjectHandler::getInstance(), $outputString);
543544
} else {
544545
throw new TestReferenceException(
545-
"Could not resolve entity reference \"{$inputString}\" in Action \"{$this->getStepKey()}\"",
546+
"Could not resolve entity reference \"{$inputString}\" "
547+
. "in Action with stepKey \"{$this->getStepKey()}\"",
546548
["input" => $inputString, "stepKey" => $this->getStepKey()]
547549
);
548550
}

0 commit comments

Comments
 (0)