public function AjaxBasePageNegotiatorTest::testApplies in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php \Drupal\Tests\Core\Theme\AjaxBasePageNegotiatorTest::testApplies()
- 9 core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php \Drupal\Tests\Core\Theme\AjaxBasePageNegotiatorTest::testApplies()
@covers ::applies @dataProvider providerTestApplies
File
- core/
tests/ Drupal/ Tests/ Core/ Theme/ AjaxBasePageNegotiatorTest.php, line 57
Class
- AjaxBasePageNegotiatorTest
- @coversDefaultClass \Drupal\Core\Theme\AjaxBasePageNegotiator @group Theme
Namespace
Drupal\Tests\Core\ThemeCode
public function testApplies($request_data, $expected) {
$request = new Request([], $request_data);
$request->request = new InputBag($request->request
->all());
$route_match = RouteMatch::createFromRequest($request);
$this->requestStack
->push($request);
$result = $this->negotiator
->applies($route_match);
$this
->assertSame($expected, $result);
}