function MenuRouterTest::testThemeIntegration

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php \Drupal\Tests\system\Functional\Menu\MenuRouterTest::testThemeIntegration()
  2. 8.9.x core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php \Drupal\Tests\system\Functional\Menu\MenuRouterTest::testThemeIntegration()
  3. 10 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 248

Class

MenuRouterTest
Tests menu router and default menu link functionality.

Namespace

Drupal\Tests\system\Functional\Menu

Code

public function testThemeIntegration() : void {
    $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();
}

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