class TestLibraryDiscoveryParser

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php \Drupal\Tests\Core\Asset\TestLibraryDiscoveryParser
  2. 8.9.x core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php \Drupal\Tests\Core\Asset\TestLibraryDiscoveryParser
  3. 10 core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php \Drupal\Tests\Core\Asset\TestLibraryDiscoveryParser

Wraps the tested class to mock the external dependencies.

Hierarchy

Expanded class hierarchy of TestLibraryDiscoveryParser

File

core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php, line 870

Namespace

Drupal\Tests\Core\Asset
View source
class TestLibraryDiscoveryParser extends LibraryDiscoveryParser {
    protected $validUris;
    protected function fileValidUri($source) {
        return $this->validUris[$source] ?? FALSE;
    }
    public function setFileValidUri($source, $valid) : void {
        $this->validUris[$source] = $valid;
    }

}

Members

Title Sort descending Modifiers Object type Summary
LibraryDiscoveryParser::$componentPluginManager protected property The component plugin manager.
LibraryDiscoveryParser::$extensionPathResolver protected property The extension path resolver.
LibraryDiscoveryParser::$fileCache protected property The file cache.
LibraryDiscoveryParser::$librariesDirectoryFileFinder protected property The libraries directory file finder.
LibraryDiscoveryParser::$moduleHandler protected property The module handler.
LibraryDiscoveryParser::$root protected property The app root.
LibraryDiscoveryParser::$streamWrapperManager protected property The stream wrapper manager.
LibraryDiscoveryParser::$themeManager protected property The theme manager.
LibraryDiscoveryParser::applyLibrariesMovedOverrides protected function Apply overrides to files that have moved.
LibraryDiscoveryParser::applyLibrariesOverride protected function Apply libraries overrides specified for the current active theme.
LibraryDiscoveryParser::buildByExtension public function Parses and builds up all the libraries information of an extension.
LibraryDiscoveryParser::isValidUri protected function Determines if the supplied string is a valid URI.
LibraryDiscoveryParser::librariesForComponents protected function Builds the dynamic library definitions for single-directory components.
LibraryDiscoveryParser::parseLibraryInfo protected function Parses a given library file and allows modules and themes to alter it.
LibraryDiscoveryParser::resolveThemeAssetPath protected function Ensures that a full path is returned for an overriding theme asset.
LibraryDiscoveryParser::setOverrideValue protected function Overrides the specified library asset.
LibraryDiscoveryParser::validateCssLibrary public static function Validates CSS library structure.
LibraryDiscoveryParser::__construct public function Constructs a new LibraryDiscoveryParser instance.
TestLibraryDiscoveryParser::$validUris protected property
TestLibraryDiscoveryParser::fileValidUri protected function
TestLibraryDiscoveryParser::setFileValidUri public function

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.