Skip to content

MQE-1669: XML Comments outside of Test and AG #395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Flat implements ConverterInterface
const REMOVE_KEY_ATTRIBUTE = 'keyForRemoval';
const EXTENDS_ATTRIBUTE = 'extends';
const TEST_HOOKS = ['before', 'after'];
const VALID_COMMENT_PARENT = ['test', 'before', 'after', 'actionGroup'];

/**
* Array node configuration.
Expand Down Expand Up @@ -124,7 +125,8 @@ public function convertXml(\DOMNode $source, $basePath = '')
) {
$value = $node->nodeValue;
break;
} elseif ($node->nodeType == XML_COMMENT_NODE) {
} elseif ($node->nodeType == XML_COMMENT_NODE &&
in_array($node->parentNode->nodeName, self::VALID_COMMENT_PARENT)) {
$uniqid = uniqid($node->nodeName);
$value[$uniqid] = [
'value' => trim($node->nodeValue),
Expand Down