You are here

public function MenuRouterTest::testThemeIntegration in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php \Drupal\Tests\system\Functional\Menu\MenuRouterTest::testThemeIntegration()
  2. 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 243

Class

MenuRouterTest
Tests menu router and default menu link functionality.

Namespace

Drupal\Tests\system\Functional\Menu

Code

public function testThemeIntegration() {
  $this->defaultTheme = 'olivero';
  $this->adminTheme = 'claro';

  /** @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();
}