function RevisionVersionHistoryTest::resetPagerState
Resets pager manager state between requests.
The PagerManager service persists maxPagerElementId across requests in kernel tests, causing subsequent requests to use a different pager element ID than expected. This makes the 'page' query parameter not correspond to the correct pager element.
@todo remove after https://www.drupal.org/project/drupal/issues/3609436
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Entity/ RevisionVersionHistoryTest.php, line 388
Class
- RevisionVersionHistoryTest
- Tests version history page.
Namespace
Drupal\KernelTests\Core\EntityCode
protected function resetPagerState() : void {
$this->container
->set('pager.manager', new PagerManager($this->container
->get('pager.parameters')));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.