You are here

public function MenuRouterTest::testThemeIntegration in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php \Drupal\Tests\system\Functional\Menu\MenuRouterTest::testThemeIntegration()

Tests theme integration.

File

core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php, line 244

Class

MenuRouterTest
Tests menu router and default menu link functionality.

Namespace

Drupal\Tests\system\Functional\Menu

Code

public function testThemeIntegration() {
  $this->defaultTheme = 'bartik';
  $this->adminTheme = 'seven';

  /** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */
  $theme_installer = $this->container
    ->get('theme_installer');
  $theme_installer
    ->install([
    $this->defaultTheme,
    $this->adminTheme,
  ]);
  $this
    ->config('system.theme')
    ->set('default', $this->defaultTheme)
    ->set('admin', $this->adminTheme)
    ->save();
  $this
    ->doTestThemeCallbackMaintenanceMode();
  $this
    ->doTestThemeCallbackFakeTheme();
  $this
    ->doTestThemeCallbackAdministrative();
  $this
    ->doTestThemeCallbackNoThemeRequested();
  $this
    ->doTestThemeCallbackOptionalTheme();
}