You are here

protected function ThemeNegotiatorTest::createThemeNegotiator in Drupal 8

Same name and namespace in other branches
  1. 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

File

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

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;
}