public function PagerManagerTest::testGetMaxPagerElementId in Drupal 9
@covers ::getMaxPagerElementId
@dataProvider providerTestGetMaxPagerElementId
File
- core/
tests/ Drupal/ KernelTests/ Core/ Pager/ PagerManagerTest.php, line 61
Class
- PagerManagerTest
- @group Pager
Namespace
Drupal\KernelTests\Core\PagerCode
public function testGetMaxPagerElementId(array $elements, int $expected_max_element_id) : void {
/** @var \Drupal\Core\Pager\PagerManagerInterface $pager_manager */
$pager_manager = $this->container
->get('pager.manager');
foreach ($elements as $element) {
$pager_manager
->createPager(30, 10, $element);
}
$this
->assertEquals($expected_max_element_id, $pager_manager
->getMaxPagerElementId());
}