function ResolvedLibraryDefinitionsFilesMatchTest::testCoreLibraryCompleteness
Ensures that all core module and theme library files exist.
File
- 
              core/
tests/ Drupal/ KernelTests/ Core/ Asset/ ResolvedLibraryDefinitionsFilesMatchTest.php, line 155  
Class
- ResolvedLibraryDefinitionsFilesMatchTest
 - Tests that the asset files for all core libraries exist.
 
Namespace
Drupal\KernelTests\Core\AssetCode
public function testCoreLibraryCompleteness() {
  // First verify all libraries with no active theme.
  $this->verifyLibraryFilesExist($this->getAllLibraries());
  // Then verify all libraries for each core theme. This may seem like
  // overkill but themes can override and extend other extensions' libraries
  // and these changes are only applied for the active theme.
  foreach ($this->allThemes as $theme) {
    $this->themeManager
      ->setActiveTheme($this->themeInitialization
      ->getActiveThemeByName($theme));
    $this->libraryDiscovery
      ->clearCachedDefinitions();
    $this->verifyLibraryFilesExist($this->getAllLibraries());
  }
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.