diff --git a/core/modules/system/src/Tests/ComposerWebTest.php b/core/modules/system/src/Tests/ComposerWebTest.php deleted file mode 100644 index 2b74b6d..0000000 --- a/core/modules/system/src/Tests/ComposerWebTest.php +++ /dev/null @@ -1,50 +0,0 @@ -replace; - - $folders = scandir($root . '/core/modules'); - $module_names = []; - - foreach ($folders as $file_name) { - if ($file_name !== '.' && $file_name !== '..') { - $module_names[] = $file_name; - } - } - - foreach ($module_names as $module_name) { - $this->assertTrue(array_key_exists('drupal/'.$module_name, $composer_replace_packages), 'Found ' . $module_name . ' in replace list of composer.json'); - } - } - -} diff --git a/core/tests/Drupal/Tests/ComposerIntegrationTest.php b/core/tests/Drupal/Tests/ComposerIntegrationTest.php index fdaef71..092fc7b 100644 --- a/core/tests/Drupal/Tests/ComposerIntegrationTest.php +++ b/core/tests/Drupal/Tests/ComposerIntegrationTest.php @@ -68,4 +68,26 @@ public function testComposerJson() { } } + /** + * Verify all modules are listed in the 'replace' section of core's + * composer.json. + */ + public function testAllModulesReplaced() { + $json = json_decode(file_get_contents($this->root . '/core/composer.json')); + $composer_replace_packages = $json->replace; + + $folders = scandir($this->root . '/core/modules'); + $module_names = []; + + foreach ($folders as $file_name) { + if ($file_name !== '.' && $file_name !== '..') { + $module_names[] = $file_name; + } + } + + foreach ($module_names as $module_name) { + $this->assertTrue(array_key_exists('drupal/'.$module_name, $composer_replace_packages), 'Found ' . $module_name . ' in replace list of composer.json'); + } + } + }