Skip to content

Commit

Permalink
Fix Element with no type attribute warnings
Browse files Browse the repository at this point in the history
- Added ternary to $elementType assignment.
  • Loading branch information
KevinBKozan authored Nov 1, 2018
1 parent 40f2cf8 commit a9e04a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Magento Functional Testing Framework Changelog

### Fixes
* Fixed an issue where mftf would fail to parse test materials for extensions installed under `vendor`.
* Fixed an issue where an `element` with no `type` would cause PHP warnings during test runs.

2.3.9
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private function __construct()
if (preg_match('/[^a-zA-Z0-9_]/', $elementName)) {
throw new XmlException(sprintf(self::ELEMENT_NAME_ERROR_MSG, $elementName, $sectionName));
}
$elementType = $elementData[SectionObjectHandler::TYPE];
$elementType = $elementData[SectionObjectHandler::TYPE] ?? null;
$elementSelector = $elementData[SectionObjectHandler::SELECTOR] ?? null;
$elementLocatorFunc = $elementData[SectionObjectHandler::LOCATOR_FUNCTION] ?? null;
$elementTimeout = $elementData[SectionObjectHandler::TIMEOUT] ?? null;
Expand Down

0 comments on commit a9e04a7

Please sign in to comment.