function PreprocessPagerTest::testQuantityNotSet
Same name in other branches
- 9 core/modules/system/tests/src/Unit/Pager/PreprocessPagerTest.php \Drupal\Tests\system\Unit\Pager\PreprocessPagerTest::testQuantityNotSet()
- 8.9.x core/modules/system/tests/src/Unit/Pager/PreprocessPagerTest.php \Drupal\Tests\system\Unit\Pager\PreprocessPagerTest::testQuantityNotSet()
- 11.x core/modules/system/tests/src/Unit/Pager/PreprocessPagerTest.php \Drupal\Tests\system\Unit\Pager\PreprocessPagerTest::testQuantityNotSet()
Tests template_preprocess_pager() when an empty #quantity is passed.
@covers ::template_preprocess_pager
File
-
core/
modules/ system/ tests/ src/ Unit/ Pager/ PreprocessPagerTest.php, line 55
Class
- PreprocessPagerTest
- Tests pager preprocessing.
Namespace
Drupal\Tests\system\Unit\PagerCode
public function testQuantityNotSet() : void {
require_once $this->root . '/core/includes/theme.inc';
$variables = [
'pager' => [
'#element' => '',
'#parameters' => [],
'#quantity' => '',
'#route_name' => '',
'#tags' => '',
],
];
template_preprocess_pager($variables);
$this->assertEquals([
'first',
'previous',
], array_keys($variables['items']));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.