Skip to content

Commit 7e85049

Browse files
committed
MAGETWO-89410: [2.3] Test testValidComposerJson fails on bundle extensions
- Backport: MAGETWO-88812: Test testValidComposerJson fails on bundle extensions
1 parent fb5eccf commit 7e85049

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
@@ -171,7 +171,9 @@ private function assertMagentoConventions($dir, $packageType, \StdClass $json)
171171
switch ($packageType) {
172172
case 'magento2-module':
173173
$xml = simplexml_load_file("$dir/etc/module.xml");
174-
$this->assertConsistentModuleName($xml, $json->name);
174+
if ($this->isVendorMagento($json->name)) {
175+
$this->assertConsistentModuleName($xml, $json->name);
176+
}
175177
$this->assertDependsOnPhp($json->require);
176178
$this->assertPhpVersionInSync($json->name, $json->require->php);
177179
$this->assertDependsOnFramework($json->require);
@@ -210,6 +212,17 @@ private function assertMagentoConventions($dir, $packageType, \StdClass $json)
210212
}
211213
}
212214

215+
/**
216+
* Returns true if package vendor is Magento.
217+
*
218+
* @param string $packageName
219+
* @return bool
220+
*/
221+
private function isVendorMagento($packageName)
222+
{
223+
return strpos($packageName, 'magento') === 0;
224+
}
225+
213226
/**
214227
* Assert that component registrar is autoloaded in composer json
215228
*

0 commit comments

Comments
 (0)