class TestLibraryDiscoveryParser
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php \Drupal\Tests\Core\Asset\TestLibraryDiscoveryParser
- 10 core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php \Drupal\Tests\Core\Asset\TestLibraryDiscoveryParser
- 11.x core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php \Drupal\Tests\Core\Asset\TestLibraryDiscoveryParser
Wraps the tested class to mock the external dependencies.
Hierarchy
- class \Drupal\Core\Asset\LibraryDiscoveryParser
- class \Drupal\Tests\Core\Asset\TestLibraryDiscoveryParser extends \Drupal\Core\Asset\LibraryDiscoveryParser
Expanded class hierarchy of TestLibraryDiscoveryParser
File
-
core/
tests/ Drupal/ Tests/ Core/ Asset/ LibraryDiscoveryParserTest.php, line 849
Namespace
Drupal\Tests\Core\AssetView source
class TestLibraryDiscoveryParser extends LibraryDiscoveryParser {
protected $validUris;
protected function fileValidUri($source) {
return $this->validUris[$source] ?? FALSE;
}
public function setFileValidUri($source, $valid) {
$this->validUris[$source] = $valid;
}
}
Members
Title Sort descending | Deprecated | Modifiers | Object type | Summary |
---|---|---|---|---|
LibraryDiscoveryParser::$extensionPathResolver | protected | property | The extension path resolver. | |
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::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::drupalGetPath | Deprecated | protected | function | Wraps drupal_get_path(). |
LibraryDiscoveryParser::isValidUri | protected | function | Determines if the supplied string is a valid URI. | |
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.