function PagerPluginBaseTest::testGetTotalItems
Same name and namespace in other branches
- 9 core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php \Drupal\Tests\views\Unit\Plugin\pager\PagerPluginBaseTest::testGetTotalItems()
- 10 core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php \Drupal\Tests\views\Unit\Plugin\pager\PagerPluginBaseTest::testGetTotalItems()
- 11.x core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php \Drupal\Tests\views\Unit\Plugin\pager\PagerPluginBaseTest::testGetTotalItems()
Tests the getTotalItems() method.
See also
\Drupal\views\Plugin\views\pager\PagerPluginBase::getTotalItems()
File
-
core/
modules/ views/ tests/ src/ Unit/ Plugin/ pager/ PagerPluginBaseTest.php, line 118
Class
- PagerPluginBaseTest
- @coversDefaultClass <a href="/api/drupal/core%21modules%21views%21src%21Plugin%21views%21pager%21PagerPluginBase.php/class/PagerPluginBase/8.9.x" title="Base class for views pager plugins." class="local">\Drupal\views\Plugin\views\pager\PagerPluginBase</a> @group views
Namespace
Drupal\Tests\views\Unit\Plugin\pagerCode
public function testGetTotalItems() {
// Should return 0 by default.
$this->assertEquals(0, $this->pager
->getTotalItems());
$this->pager->total_items = 10;
$this->assertEquals(10, $this->pager
->getTotalItems());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.