diff --git a/core/modules/taxonomy/src/Form/OverviewTerms.php b/core/modules/taxonomy/src/Form/OverviewTerms.php index eebbacc26a89..d7d54ed57dd1 100644 --- a/core/modules/taxonomy/src/Form/OverviewTerms.php +++ b/core/modules/taxonomy/src/Form/OverviewTerms.php @@ -358,6 +358,7 @@ class OverviewTerms extends FormBase { ); } + $form['pager_pager'] = ['#type' => 'pager']; return $form; } diff --git a/core/modules/taxonomy/src/Tests/TaxonomyTermPagerTest.php b/core/modules/taxonomy/src/Tests/TaxonomyTermPagerTest.php new file mode 100644 index 000000000000..515d4dbed0fe --- /dev/null +++ b/core/modules/taxonomy/src/Tests/TaxonomyTermPagerTest.php @@ -0,0 +1,72 @@ +drupalLogin($this->drupalCreateUser(['administer taxonomy', 'bypass node access'])); + $this->vocabulary = $this->createVocabulary(); + } + + /** + * Tests that the pager is displayed properly on the term overview page. + */ + public function testTaxonomyTermOverviewPager() { + // Set limit to 3 terms per page. + $this->config('taxonomy.settings') + ->set('terms_per_page_admin', '3') + ->save(); + + // Create 3 terms. + for ($x = 1; $x <= 3; $x++) { + $this->createTerm($this->vocabulary); + } + + // Get Page 1. + $this->drupalGet('admin/structure/taxonomy/manage/' . $this->vocabulary->id() . '/overview'); + $this->assertNoPattern('|