Skip to content

Commit 45921f2

Browse files
author
Olga Kopylova
committed
MAGETWO-31732: Blacklisted ComposerTest
- added test for forgotten "replace" packages
1 parent ed87bf6 commit 45921f2

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

composer.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,7 @@
143143
"magento/language-pt_br": "self.version",
144144
"magento/language-zh_cn": "self.version",
145145
"magento/framework": "self.version",
146-
"magento/project-setup": "0.1.0",
147146
"oyejorge/less.php": "1.7.0",
148-
"symfony/yaml": "2.3.x-dev",
149147
"trentrichardson/jquery-timepicker-addon": "1.4.3",
150148
"components/handlebars.js": "1.3.0",
151149
"colinmollenhour/cache-backend-redis": "dev-master#193d377b7fb2e88595578b282fa01a62d1185abc",

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,5 +414,14 @@ public function testComponentPathsInRoot()
414414
"The {$component} is specified in 'extra->component_paths', but missing in 'replace' section"
415415
);
416416
}
417+
foreach (array_keys(self::$rootJson['replace']) as $replace) {
418+
if (!MagentoComponent::matchMagentoComponent($replace)) {
419+
$this->assertArrayHasKey(
420+
$replace,
421+
self::$rootJson['extra']['component_paths'],
422+
"The {$replace} is specified in 'replace', but missing in 'extra->component_paths' section"
423+
);
424+
}
425+
}
417426
}
418427
}

lib/internal/Magento/Framework/Composer/MagentoComponent.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
*/
55
namespace Magento\Framework\Composer;
66

7-
class MagentoComponent {
7+
class MagentoComponent
8+
{
89
/**
910
* Get matched Magento component or empty array, if it's not a Magento component
1011
*

0 commit comments

Comments
 (0)