function LibraryDiscoveryIntegrationTest::testBaseThemeLibrariesOverrideInSubTheme

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php \Drupal\KernelTests\Core\Asset\LibraryDiscoveryIntegrationTest::testBaseThemeLibrariesOverrideInSubTheme()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php \Drupal\KernelTests\Core\Asset\LibraryDiscoveryIntegrationTest::testBaseThemeLibrariesOverrideInSubTheme()
  3. 10 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 179

Class

LibraryDiscoveryIntegrationTest
Tests the library discovery and library discovery parser.

Namespace

Drupal\KernelTests\Core\Asset

Code

public function testBaseThemeLibrariesOverrideInSubTheme() : void {
    // 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/js/loadjs.min.js', 'core', 'loadjs', 'js');
}

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