Skip to content

Commit 53e9d75

Browse files
committed
AC-659: Create phpcs static check for ModuleXMLTest
1 parent c43f253 commit 53e9d75

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9+
<module name="Magento_TestModule" active="true" version="1" />
10+
</config>

Magento2/Tests/Legacy/ModuleXMLUnitTest.xml renamed to Magento2/Tests/Legacy/ModuleXMLUnitTest.2.xml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="Magento_TestModule" active="true" version="1" />
109
<module
1110
name="Magento_TestModule2"
1211
active="true"

Magento2/Tests/Legacy/ModuleXMLUnitTest.php

+12-5
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,18 @@ public function getErrorList()
2020
/**
2121
* @inheritdoc
2222
*/
23-
public function getWarningList()
23+
public function getWarningList($testFile = '')
2424
{
25-
return [
26-
9 => 2,
27-
10 => 2
28-
];
25+
if ($testFile === 'ModuleXMLUnitTest.1.xml') {
26+
return [
27+
9 => 2,
28+
];
29+
}
30+
if ($testFile === 'ModuleXMLUnitTest.2.xml') {
31+
return [
32+
9 => 2,
33+
];
34+
}
35+
return [];
2936
}
3037
}

0 commit comments

Comments
 (0)