diff --git a/core/modules/system/src/Tests/ComposerWebTest.php b/core/modules/system/src/Tests/ComposerWebTest.php index 261989b..2b74b6d 100644 --- a/core/modules/system/src/Tests/ComposerWebTest.php +++ b/core/modules/system/src/Tests/ComposerWebTest.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\action\Tests\ActionUninstallTest. + * Contains \Drupal\system\Tests\ComposerWebTest. */ namespace Drupal\system\Tests; @@ -24,7 +24,8 @@ class ComposerWebTest extends WebTestBase { public static $modules = []; /** - * Test to see if all modules are in the replace array of core's composer.json + * Verify all modules are listed in the 'replace' section of core's + * composer.json. */ public function testAllModulesReplaced() { $root = dirname(dirname(substr(__DIR__, 0, -strlen(__NAMESPACE__)))); @@ -32,12 +33,12 @@ public function testAllModulesReplaced() { $json = json_decode(file_get_contents($root . '/core/composer.json')); $composer_replace_packages = $json->replace; - $modules = system_rebuild_module_data(); + $folders = scandir($root . '/core/modules'); $module_names = []; - foreach ($modules as $name => $module) { - if (strpos($module->getPathname(), '/tests/') === false && strpos($module->getPathname(), '/profiles/testing/') === false) { - $module_names[] = $name; + foreach ($folders as $file_name) { + if ($file_name !== '.' && $file_name !== '..') { + $module_names[] = $file_name; } }