public function PagerTest::testViewTotalRowsWithoutPager

File

drupal/core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php, line 143
Definition of Drupal\views\Tests\Plugin\PagerTest.

Class

PagerTest
Tests the pluggable pager system.

Namespace

Drupal\views\Tests\Plugin

Code

public function testViewTotalRowsWithoutPager() {
  for ($i = 0; $i < 23; $i++) {
    $this
      ->drupalCreateNode();
  }
  $view = views_get_view('test_pager_none');
  $view->get_total_rows = TRUE;
  $this
    ->executeView($view);
  $this
    ->assertEqual($view->total_rows, 23, "'total_rows' is calculated when pager type is 'none' and 'get_total_rows' is TRUE.");
}