function PagerManagerTest::testDefaultInitializeGlobals
@covers ::createPager
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Pager/ PagerManagerTest.php, line 18
Class
- PagerManagerTest
- @group Pager
Namespace
Drupal\KernelTests\Core\PagerCode
public function testDefaultInitializeGlobals() {
$pager_globals = [
'pager_page_array',
'pager_total_items',
'pager_total',
'pager_limits',
];
foreach ($pager_globals as $pager_global) {
$this->assertFalse(isset($GLOBALS[$pager_global]));
}
/* @var $pager_manager \Drupal\Core\Pager\PagerManagerInterface */
$pager_manager = $this->container
->get('pager.manager');
$pager_manager->createPager(5, 1);
foreach ($pager_globals as $pager_global) {
$this->assertTrue(isset($GLOBALS[$pager_global]));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.