function AjaxBasePageNegotiatorTest::setUp
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php \Drupal\Tests\Core\Theme\AjaxBasePageNegotiatorTest::setUp()
- 8.9.x core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php \Drupal\Tests\Core\Theme\AjaxBasePageNegotiatorTest::setUp()
- 10 core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php \Drupal\Tests\Core\Theme\AjaxBasePageNegotiatorTest::setUp()
Overrides UnitTestCase::setUp
File
-
core/
tests/ Drupal/ Tests/ Core/ Theme/ AjaxBasePageNegotiatorTest.php, line 46
Class
- AjaxBasePageNegotiatorTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Theme%21AjaxBasePageNegotiator.php/class/AjaxBasePageNegotiator/11.x" title="Defines a theme negotiator that deals with the active theme on ajax requests." class="local">\Drupal\Core\Theme\AjaxBasePageNegotiator</a> @group Theme
Namespace
Drupal\Tests\Core\ThemeCode
protected function setUp() : void {
parent::setUp();
$this->tokenGenerator = $this->prophesize(CsrfTokenGenerator::class);
$config_factory = $this->getConfigFactoryStub([
'system.theme' => [
'default' => 'stark',
],
]);
$this->requestStack = new RequestStack();
$this->negotiator = new AjaxBasePageNegotiator($this->tokenGenerator
->reveal(), $config_factory, $this->requestStack);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.