public function PagerPluginBaseTest::testHasMoreRecords in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php \Drupal\Tests\views\Unit\Plugin\pager\PagerPluginBaseTest::testHasMoreRecords()
- 9 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 - Contains \Drupal\Tests\views\Unit\Plugin\pager\PagerPluginBaseTest.
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());
}