function RequestPagerTest::testGetQueryParameters
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Pager/RequestPagerTest.php \Drupal\KernelTests\Core\Pager\RequestPagerTest::testGetQueryParameters()
- 8.9.x core/tests/Drupal/KernelTests/Core/Pager/RequestPagerTest.php \Drupal\KernelTests\Core\Pager\RequestPagerTest::testGetQueryParameters()
- 10 core/tests/Drupal/KernelTests/Core/Pager/RequestPagerTest.php \Drupal\KernelTests\Core\Pager\RequestPagerTest::testGetQueryParameters()
@covers ::getQueryParameters
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Pager/ RequestPagerTest.php, line 38
Class
- RequestPagerTest
- @group Pager
Namespace
Drupal\KernelTests\Core\PagerCode
public function testGetQueryParameters() : void {
$test_parameters = [
'other' => 'arbitrary',
];
$request = Request::create('http://example.com', 'GET', array_merge([
'page' => '0,10',
], $test_parameters));
$request->setSession(new Session(new MockArraySessionStorage()));
/** @var \Symfony\Component\HttpFoundation\RequestStack $request_stack */
$request_stack = $this->container
->get('request_stack');
$request_stack->push($request);
$pager_params = $this->container
->get('pager.parameters');
$this->assertEquals($test_parameters, $pager_params->getQueryParameters());
$this->assertEquals(0, $pager_params->findPage());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.