Skip to content

Commit cfbc5c0

Browse files
committed
MQE-2126: Can't modify DataEntity data
1 parent 56d8288 commit cfbc5c0

File tree

2 files changed

+4
-4
lines changed
  • src/Magento/FunctionalTestingFramework

2 files changed

+4
-4
lines changed

src/Magento/FunctionalTestingFramework/Config/Dom.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ protected function getNodePathByParent(\DOMElement $node, $parentPath)
246246
$idAttribute = $this->nodeMergingConfig->getIdAttribute($path);
247247
if ($idAttribute) {
248248
foreach (explode('|', $idAttribute) as $idAttributeValue) {
249-
if ($value = $node->getAttribute($idAttributeValue)) {
250-
$path .= "[@{$idAttributeValue}='{$value}']";
249+
if ($node->hasAttribute($idAttributeValue)) {
250+
$path .= "[@{$idAttributeValue}='" . $node->getAttribute($idAttributeValue) . "']";
251251
break;
252252
}
253253
}

src/Magento/FunctionalTestingFramework/DataGenerator/Config/Dom.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ public function initDom($xml, $filename = null)
8282
}
8383

8484
$itemNodes = $dom->getElementsByTagName('item');
85+
/** @var \DOMElement $itemNode */
8586
foreach ($itemNodes as $itemKey => $itemNode) {
86-
if ($itemNode->hasAttribute("name") === false) {
87+
if ($itemNode->hasAttribute("name") == false) {
8788
$itemNode->setAttribute("name", (string)$itemKey);
8889
}
8990
}
90-
9191
return $dom;
9292
}
9393
}

0 commit comments

Comments
 (0)