public function LibraryDiscoveryIntegrationTest::testLibrariesOverrideOtherAssetLibraryNames in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Asset/LibraryDiscoveryIntegrationTest.php \Drupal\system\Tests\Asset\LibraryDiscoveryIntegrationTest::testLibrariesOverrideOtherAssetLibraryNames()
Tests library assets with other ways for specifying paths.
File
- core/
modules/ system/ src/ Tests/ Asset/ LibraryDiscoveryIntegrationTest.php, line 137 - Contains \Drupal\system\Tests\Asset\LibraryDiscoveryIntegrationTest.
Class
- LibraryDiscoveryIntegrationTest
- Tests the library discovery and library discovery parser.
Namespace
Drupal\system\Tests\AssetCode
public function testLibrariesOverrideOtherAssetLibraryNames() {
// Activate a test theme that defines libraries overrides on other types of
// assets.
$this
->activateTheme('test_theme');
// Assert Drupal-relative paths.
$this
->assertAssetInLibrary('themes/my_theme/css/dropbutton.css', 'core', 'drupal.dropbutton', 'css');
// Assert stream wrapper paths.
$this
->assertAssetInLibrary('public://my_css/vertical-tabs.css', 'core', 'drupal.vertical-tabs', 'css');
// Assert a protocol-relative URI.
$this
->assertAssetInLibrary('//my-server/my_theme/css/jquery_ui.css', 'core', 'jquery.ui', 'css');
// Assert an absolute URI.
$this
->assertAssetInLibrary('http://example.com/my_theme/css/farbtastic.css', 'core', 'jquery.farbtastic', 'css');
}