public function AjaxBasePageNegotiatorTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 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 43
Class
- AjaxBasePageNegotiatorTest
- @coversDefaultClass \Drupal\Core\Theme\AjaxBasePageNegotiator @group Theme
Namespace
Drupal\Tests\Core\ThemeCode
public function setUp() : void {
parent::setUp();
$this->tokenGenerator = $this
->prophesize(CsrfTokenGenerator::class);
$config_factory = $this
->getConfigFactoryStub([
'system.theme' => [
'default' => 'bartik',
],
]);
$this->requestStack = new RequestStack();
$this->negotiator = new AjaxBasePageNegotiator($this->tokenGenerator
->reveal(), $config_factory, $this->requestStack);
}