function ThemeTest::testNegotiatorPriorities

Same name and namespace in other branches
  1. 8.9.x core/modules/system/tests/src/Functional/Theme/ThemeTest.php \Drupal\Tests\system\Functional\Theme\ThemeTest::testNegotiatorPriorities()
  2. 10 core/modules/system/tests/src/Functional/Theme/ThemeTest.php \Drupal\Tests\system\Functional\Theme\ThemeTest::testNegotiatorPriorities()
  3. 11.x 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 55

Class

ThemeTest
Tests low-level theme functions.

Namespace

Drupal\Tests\system\Functional\Theme

Code

public function testNegotiatorPriorities() {
    $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.