function PagerPluginBaseTest::testHasMoreRecords
Same name in other branches
- 9 core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php \Drupal\Tests\views\Unit\Plugin\pager\PagerPluginBaseTest::testHasMoreRecords()
- 10 core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php \Drupal\Tests\views\Unit\Plugin\pager\PagerPluginBaseTest::testHasMoreRecords()
- 11.x core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php \Drupal\Tests\views\Unit\Plugin\pager\PagerPluginBaseTest::testHasMoreRecords()
Tests the hasMoreRecords() method.
@dataProvider providerTestHasMoreRecords
See also
\Drupal\views\Plugin\views\pager\PagerPluginBase::hasMoreRecords()
File
-
core/
modules/ views/ tests/ src/ Unit/ Plugin/ pager/ PagerPluginBaseTest.php, line 174
Class
- PagerPluginBaseTest
- @coversDefaultClass \Drupal\views\Plugin\views\pager\PagerPluginBase @group views
Namespace
Drupal\Tests\views\Unit\Plugin\pagerCode
public function testHasMoreRecords($items_per_page, $total_items, $current_page, $has_more_records) {
$this->pager
->setItemsPerPage($items_per_page);
$this->pager->total_items = $total_items;
$this->pager
->setCurrentPage($current_page);
$this->assertEquals($has_more_records, $this->pager
->hasMoreRecords());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.