You are here

protected function ThemeNegotiatorTest::createThemeNegotiator in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Theme/ThemeNegotiatorTest.php \Drupal\Tests\Core\Theme\ThemeNegotiatorTest::createThemeNegotiator()
  2. 9 core/tests/Drupal/Tests/Core/Theme/ThemeNegotiatorTest.php \Drupal\Tests\Core\Theme\ThemeNegotiatorTest::createThemeNegotiator()

Creates a new theme negotiator instance.

Parameters

array $negotiators: An array of negotiator IDs.

Return value

\Drupal\Core\Theme\ThemeNegotiator

4 calls to ThemeNegotiatorTest::createThemeNegotiator()
ThemeNegotiatorTest::testDetermineActiveTheme in core/tests/Drupal/Tests/Core/Theme/ThemeNegotiatorTest.php
Tests determining the theme.
ThemeNegotiatorTest::testDetermineActiveThemeWithAccessCheck in core/tests/Drupal/Tests/Core/Theme/ThemeNegotiatorTest.php
Tests determining with two negotiators of which just one returns access.
ThemeNegotiatorTest::testDetermineActiveThemeWithNotApplyingNegotiator in core/tests/Drupal/Tests/Core/Theme/ThemeNegotiatorTest.php
Tests determining with two negotiators of which one does not apply.
ThemeNegotiatorTest::testDetermineActiveThemeWithPriority in core/tests/Drupal/Tests/Core/Theme/ThemeNegotiatorTest.php
Tests determining with two negotiators checking the priority.

File

core/tests/Drupal/Tests/Core/Theme/ThemeNegotiatorTest.php, line 218

Class

ThemeNegotiatorTest
@coversDefaultClass \Drupal\Core\Theme\ThemeNegotiator @group Theme

Namespace

Drupal\Tests\Core\Theme

Code

protected function createThemeNegotiator(array $negotiators) {
  $resolver = new ClassResolver();
  $resolver
    ->setContainer($this->container);
  $theme_negotiator = new ThemeNegotiator($this->themeAccessCheck, $resolver, $negotiators);
  return $theme_negotiator;
}