class TestLibraryDiscoveryParser in Drupal 8
Same name and namespace in other branches
- 9 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
Expanded class hierarchy of TestLibraryDiscoveryParser
File
- core/
tests/ Drupal/ Tests/ Core/ Asset/ LibraryDiscoveryParserTest.php, line 670 - Contains \Drupal\Tests\Core\Asset\LibraryDiscoveryParserTest.
Namespace
Drupal\Tests\Core\AssetView source
class TestLibraryDiscoveryParser extends LibraryDiscoveryParser {
protected $paths;
protected $validUris;
protected function drupalGetPath($type, $name) {
return isset($this->paths[$type][$name]) ? $this->paths[$type][$name] : NULL;
}
public function setPaths($type, $name, $path) {
$this->paths[$type][$name] = $path;
}
protected function fileValidUri($source) {
return isset($this->validUris[$source]) ? $this->validUris[$source] : FALSE;
}
public function setFileValidUri($source, $valid) {
$this->validUris[$source] = $valid;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LibraryDiscoveryParser:: |
protected | property | The libraries directory file finder. | |
LibraryDiscoveryParser:: |
protected | property | The module handler. | |
LibraryDiscoveryParser:: |
protected | property | The app root. | |
LibraryDiscoveryParser:: |
protected | property | The stream wrapper manager. | |
LibraryDiscoveryParser:: |
protected | property | The theme manager. | |
LibraryDiscoveryParser:: |
protected | function | Apply libraries overrides specified for the current active theme. | |
LibraryDiscoveryParser:: |
public | function | Parses and builds up all the libraries information of an extension. | |
LibraryDiscoveryParser:: |
protected | function | Determines if the supplied string is a valid URI. | |
LibraryDiscoveryParser:: |
protected | function | Parses a given library file and allows modules and themes to alter it. | |
LibraryDiscoveryParser:: |
protected | function | Ensures that a full path is returned for an overriding theme asset. | |
LibraryDiscoveryParser:: |
protected | function | Overrides the specified library asset. | |
LibraryDiscoveryParser:: |
public static | function | Validates CSS library structure. | |
LibraryDiscoveryParser:: |
public | function | Constructs a new LibraryDiscoveryParser instance. | |
TestLibraryDiscoveryParser:: |
protected | property | ||
TestLibraryDiscoveryParser:: |
protected | property | ||
TestLibraryDiscoveryParser:: |
protected | function |
Wraps drupal_get_path(). Overrides LibraryDiscoveryParser:: |
|
TestLibraryDiscoveryParser:: |
protected | function |
Wraps \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::isValidUri(). Overrides LibraryDiscoveryParser:: |
|
TestLibraryDiscoveryParser:: |
public | function | ||
TestLibraryDiscoveryParser:: |
public | function |