diff --git a/core/modules/system/src/Tests/Asset/LibraryCompletenessTest.php b/core/modules/system/src/Tests/Asset/LibraryCompletenessTest.php index d791ee1..ab29e85 100644 --- a/core/modules/system/src/Tests/Asset/LibraryCompletenessTest.php +++ b/core/modules/system/src/Tests/Asset/LibraryCompletenessTest.php @@ -73,7 +73,7 @@ public function testCoreLibraryCompleteness() { // Check that all the assets exist. foreach (['css', 'js'] as $asset_type) { - foreach ($library[$asset_type] as $index => $asset) { + foreach ($library[$asset_type] as $asset) { $file = $asset['data']; $this->assertTrue(is_file($root . '/' . $file), "$file file referenced from the $extension/$library_name library exists."); } @@ -95,9 +95,8 @@ protected function getAllLibraries() { $root = \Drupal::root(); foreach ($modules as $module_name => $module) { - $path = $module->getPath(); - $library_file = $path . '/' . $module_name . '.libraries.yml'; - if (file_exists($root . '/' . $library_file)) { + $library_file = $module->getPath() . '/' . $module_name . '.libraries.yml'; + if (is_file($root . '/' . $library_file)) { $libraries[$module_name] = $this->libraryDiscovery->getLibrariesByExtension($module_name); } }