function ThemeTest::testNegotiatorPriorities

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/Theme/ThemeTest.php \Drupal\Tests\system\Functional\Theme\ThemeTest::testNegotiatorPriorities()
  2. 8.9.x core/modules/system/tests/src/Functional/Theme/ThemeTest.php \Drupal\Tests\system\Functional\Theme\ThemeTest::testNegotiatorPriorities()
  3. 10 core/modules/system/tests/src/Functional/Theme/ThemeTest.php \Drupal\Tests\system\Functional\Theme\ThemeTest::testNegotiatorPriorities()

Tests the priority of some theme negotiators.

File

core/modules/system/tests/src/Functional/Theme/ThemeTest.php, line 57

Class

ThemeTest
Tests low-level theme functions.

Namespace

Drupal\Tests\system\Functional\Theme

Code

public function testNegotiatorPriorities() : void {
    $this->drupalGet('theme-test/priority');
    // Ensure that the custom theme negotiator was not able to set the theme.
    $this->assertSession()
        ->pageTextNotContains('Theme hook implementor=theme-test--suggestion.html.twig. Foo=template_preprocess_theme_test');
}

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