public function LibraryDiscoveryIntegrationTest::testBaseThemeLibrariesOverrideInSubTheme in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php \Drupal\KernelTests\Core\Asset\LibraryDiscoveryIntegrationTest::testBaseThemeLibrariesOverrideInSubTheme()
Tests that base theme libraries-override still apply in sub themes.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Asset/ LibraryDiscoveryIntegrationTest.php, line 159
Class
- LibraryDiscoveryIntegrationTest
- Tests the library discovery and library discovery parser.
Namespace
Drupal\KernelTests\Core\AssetCode
public function testBaseThemeLibrariesOverrideInSubTheme() {
// Activate a test theme that has subthemes.
$this
->activateTheme('test_subtheme');
// Assert that libraries-override specified in the base theme still applies
// in the sub theme.
$this
->assertNoAssetInLibrary('core/misc/dialog/dialog.js', 'core', 'drupal.dialog', 'js');
$this
->assertAssetInLibrary('core/modules/system/tests/themes/test_basetheme/css/farbtastic.css', 'core', 'jquery.farbtastic', 'css');
}