function MenuRouterTest::doTestThemeCallbackFakeTheme

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php \Drupal\Tests\system\Functional\Menu\MenuRouterTest::doTestThemeCallbackFakeTheme()
  2. 10 core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php \Drupal\Tests\system\Functional\Menu\MenuRouterTest::doTestThemeCallbackFakeTheme()
  3. 11.x core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php \Drupal\Tests\system\Functional\Menu\MenuRouterTest::doTestThemeCallbackFakeTheme()

Test the theme negotiation when it is set to use a theme that does not exist.

1 call to MenuRouterTest::doTestThemeCallbackFakeTheme()
MenuRouterTest::testThemeIntegration in core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php
Tests theme integration.

File

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

Class

MenuRouterTest
Tests menu router and default menu link functionality.

Namespace

Drupal\Tests\system\Functional\Menu

Code

protected function doTestThemeCallbackFakeTheme() {
    $this->drupalGet('menu-test/theme-callback/use-fake-theme');
    $this->assertText('Active theme: bartik. Actual theme: bartik.', 'The theme negotiation system falls back on the default theme when a theme that does not exist is requested.');
    $this->assertRaw('bartik/css/base/elements.css', "The default theme's CSS appears on the page.");
}

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