public function PagerTest::testRenderNullPager in Views (for Drupal 7) 8.3
Tests rendering with NULL pager.
File
- lib/
Drupal/ views/ Tests/ Plugin/ PagerTest.php, line 252 - Definition of Drupal\views\Tests\Plugin\PagerTest.
Class
- PagerTest
- Tests the pluggable pager system.
Namespace
Drupal\views\Tests\PluginCode
public function testRenderNullPager() {
// Create 11 nodes and make sure that everyone is returned.
// We create 11 nodes, because the default pager plugin had 10 items per page.
for ($i = 0; $i < 11; $i++) {
$this
->drupalCreateNode();
}
$view = $this
->createViewFromConfig('test_pager_full');
$this
->executeView($view);
$view->use_ajax = TRUE;
// force the value again here
$view->pager = NULL;
$output = $view
->render();
$this
->assertEqual(preg_match('/<ul class="pager">/', $output), 0, t('The pager is not rendered.'));
}