diff --git a/core/modules/views/src/Tests/Plugin/ExposedFormTest.php b/core/modules/views/src/Tests/Plugin/ExposedFormTest.php index fbd5b88..50d040e 100644 --- a/core/modules/views/src/Tests/Plugin/ExposedFormTest.php +++ b/core/modules/views/src/Tests/Plugin/ExposedFormTest.php @@ -166,6 +166,11 @@ public function testExposedFormRenderCheckboxes() { $filter = $view->getHandler('page_1', 'filter', 'type'); $filter['expose']['multiple'] = TRUE; $view->setHandler('page_1', 'filter', 'type', $filter); + + // Only display 5 items per page so we can test that paging works. + $display = &$view->storage->getDisplay('default'); + $display['display_options']['pager']['options']['items_per_page'] = 5; + $view->save(); $this->drupalGet('test_exposed_form_buttons'); @@ -176,7 +181,12 @@ public function testExposedFormRenderCheckboxes() { // Ensure that all results are displayed. $rows = $this->xpath("//div[contains(@class, 'views-row')]"); - $this->assertEqual(count($rows), 6, 'All rows are displayed by default when no options are checked.'); + $this->assertEqual(count($rows), 5, '5 rows are displayed by default on the first page when no options are checked.'); + + $this->clickLink('Page 2'); + $rows = $this->xpath("//div[contains(@class, 'views-row')]"); + $this->assertEqual(count($rows), 1, '1 row is displayed by default on the second page when no options are checked.'); + $this->assertNoText('An illegal choice has been detected. Please contact the site administrator.'); } /**