Loading core/includes/theme.inc +0 −2 Changes for core/includes/theme.inc: 0 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -1814,7 +1814,6 @@ function template_preprocess_pager(&$variables) { } } if ($i != $pager_max) { // Add an ellipsis if there are further previous pages. if ($i > 1) { $variables['ellipses']['previous'] = TRUE; Loading @@ -1834,7 +1833,6 @@ function template_preprocess_pager(&$variables) { if ($i < $pager_max + 1) { $variables['ellipses']['next'] = TRUE; } } // Create the "next" and "last" links if we are not on the last page. if ($current_page < ($pager_max - 1)) { Loading core/modules/views/tests/src/Functional/Plugin/PagerTest.php +16 −0 Changes for core/modules/views/tests/src/Functional/Plugin/PagerTest.php: 16 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -351,6 +351,22 @@ public function testNormalPager() { // Test pager cache contexts. $this->drupalGet('test_pager_full'); $this->assertCacheContexts(['languages:language_interface', 'theme', 'timezone', 'url.query_args', 'user.node_grants:view']); // Set "Number of pager links visible" to 1 and check the active page number // on the last page. $view = Views::getView('test_pager_full'); $view->setDisplay(); $pager = [ 'type' => 'full', 'options' => [ 'items_per_page' => 5, 'quantity' => 1, ], ]; $view->display_handler->setOption('pager', $pager); $view->save(); $this->drupalGet('test_pager_full', ['query' => ['page' => 2]]); $this->assertEquals('Current page 3', $this->assertSession()->elementExists('css', '.pager__items li.is-active')->getText()); } /** Loading Loading
core/includes/theme.inc +0 −2 Changes for core/includes/theme.inc: 0 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -1814,7 +1814,6 @@ function template_preprocess_pager(&$variables) { } } if ($i != $pager_max) { // Add an ellipsis if there are further previous pages. if ($i > 1) { $variables['ellipses']['previous'] = TRUE; Loading @@ -1834,7 +1833,6 @@ function template_preprocess_pager(&$variables) { if ($i < $pager_max + 1) { $variables['ellipses']['next'] = TRUE; } } // Create the "next" and "last" links if we are not on the last page. if ($current_page < ($pager_max - 1)) { Loading
core/modules/views/tests/src/Functional/Plugin/PagerTest.php +16 −0 Changes for core/modules/views/tests/src/Functional/Plugin/PagerTest.php: 16 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -351,6 +351,22 @@ public function testNormalPager() { // Test pager cache contexts. $this->drupalGet('test_pager_full'); $this->assertCacheContexts(['languages:language_interface', 'theme', 'timezone', 'url.query_args', 'user.node_grants:view']); // Set "Number of pager links visible" to 1 and check the active page number // on the last page. $view = Views::getView('test_pager_full'); $view->setDisplay(); $pager = [ 'type' => 'full', 'options' => [ 'items_per_page' => 5, 'quantity' => 1, ], ]; $view->display_handler->setOption('pager', $pager); $view->save(); $this->drupalGet('test_pager_full', ['query' => ['page' => 2]]); $this->assertEquals('Current page 3', $this->assertSession()->elementExists('css', '.pager__items li.is-active')->getText()); } /** Loading