You are here

protected function OffCanvasTestBase::enableTheme in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php \Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase::enableTheme()
  2. 10 core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php \Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase::enableTheme()

Enables a theme.

Parameters

string $theme: The theme.

6 calls to OffCanvasTestBase::enableTheme()
OffCanvasTest::testNarrowWidth in core/modules/system/tests/src/FunctionalJavascript/OffCanvasTest.php
Tests the body displacement behaves differently at a narrow width.
OffCanvasTest::testOffCanvasLinks in core/modules/system/tests/src/FunctionalJavascript/OffCanvasTest.php
Tests that non-contextual links will work with the off-canvas dialog.
QuickEditIntegrationTest::testQuickEditLinks in core/modules/settings_tray/tests/src/FunctionalJavascript/QuickEditIntegrationTest.php
Tests QuickEdit links behavior.
SettingsTrayBlockFormTest::doTestBlocks in core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php
Tests opening off-canvas dialog by click blocks and elements in the blocks.
SettingsTrayBlockFormTest::testEditModeEnableDisable in core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php
Tests enabling and disabling Edit Mode.

... See full list

File

core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php, line 53

Class

OffCanvasTestBase
Base class contains common test functionality for the Off-canvas dialog.

Namespace

Drupal\Tests\system\FunctionalJavascript

Code

protected function enableTheme($theme) {

  // Enable the theme.
  \Drupal::service('theme_installer')
    ->install([
    $theme,
  ]);
  $theme_config = \Drupal::configFactory()
    ->getEditable('system.theme');
  $theme_config
    ->set('default', $theme);
  $theme_config
    ->save();
}