Skip to content

Commit 960daf7

Browse files
committed
MAGETWO-88812: Test testValidComposerJson fails on bundle extensions
- skip package naming conventions validation for modules which a vendor is not magento
1 parent 9efa5e1 commit 960daf7

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

dev/tests/static/testsuite/Magento/Test/Integrity/ComposerTest.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ private function assertMagentoConventions($dir, $packageType, \StdClass $json)
153153
switch ($packageType) {
154154
case 'magento2-module':
155155
$xml = simplexml_load_file("$dir/etc/module.xml");
156-
$this->assertConsistentModuleName($xml, $json->name);
156+
if ($this->isVendorMagento($json->name)) {
157+
$this->assertConsistentModuleName($xml, $json->name);
158+
}
157159
$this->assertDependsOnPhp($json->require);
158160
$this->assertPhpVersionInSync($json->name, $json->require->php);
159161
$this->assertDependsOnFramework($json->require);
@@ -189,6 +191,17 @@ private function assertMagentoConventions($dir, $packageType, \StdClass $json)
189191
$this->assertPackageVersions($json);
190192
}
191193

194+
/**
195+
* Returns true if package vendor is Magento.
196+
*
197+
* @param string $packageName
198+
* @return bool
199+
*/
200+
private function isVendorMagento($packageName)
201+
{
202+
return strpos($packageName, 'magento') === 0;
203+
}
204+
192205
/**
193206
* Assert that component registrar is autoloaded in composer json
194207
*

0 commit comments

Comments
 (0)