You are here

public function LibraryDiscoveryIntegrationTest::testBaseThemeLibrariesOverrideInSubTheme in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Asset/LibraryDiscoveryIntegrationTest.php \Drupal\system\Tests\Asset\LibraryDiscoveryIntegrationTest::testBaseThemeLibrariesOverrideInSubTheme()

Tests that base theme libraries-override still apply in sub themes.

File

core/modules/system/src/Tests/Asset/LibraryDiscoveryIntegrationTest.php, line 158
Contains \Drupal\system\Tests\Asset\LibraryDiscoveryIntegrationTest.

Class

LibraryDiscoveryIntegrationTest
Tests the library discovery and library discovery parser.

Namespace

Drupal\system\Tests\Asset

Code

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');
}