diff --git a/core/modules/taxonomy/src/Form/OverviewTerms.php b/core/modules/taxonomy/src/Form/OverviewTerms.php index 14eecb0..d7d54ed 100644 --- a/core/modules/taxonomy/src/Form/OverviewTerms.php +++ b/core/modules/taxonomy/src/Form/OverviewTerms.php @@ -358,7 +358,7 @@ public function buildForm(array $form, FormStateInterface $form_state, Vocabular ); } - $form['pager_pager'] = array('#type' => 'pager'); + $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 index 9425c62..6e9d2ed 100644 --- a/core/modules/taxonomy/src/Tests/TaxonomyTermPagerTest.php +++ b/core/modules/taxonomy/src/Tests/TaxonomyTermPagerTest.php @@ -7,10 +7,8 @@ namespace Drupal\taxonomy\Tests; -use Drupal\taxonomy\Entity\Term; - /** - * Ensure that the term pager works properly. + * Ensures that the term pager works properly. * * @group taxonomy */ @@ -21,7 +19,7 @@ class TaxonomyTermPagerTest extends TaxonomyTestBase { * * @var array */ - public static $modules = array('taxonomy'); + public static $modules = ['taxonomy']; /** * Vocabulary for testing. @@ -30,6 +28,9 @@ class TaxonomyTermPagerTest extends TaxonomyTestBase { */ protected $vocabulary; + /** + * {@inheritdoc} + */ protected function setUp() { parent::setUp(); $this->drupalLogin($this->drupalCreateUser(['administer taxonomy', 'bypass node access'])); @@ -40,26 +41,23 @@ protected function setUp() { * Tests that the pager is visible when there are more terms to display * than the terms_per_page_admin setting */ - function testTaxonomyTermOverviewPager() { + public function testTaxonomyTermOverviewPager() { // Set limit to 3 terms per page. - $this->config('taxonomy.settings')->set('terms_per_page_admin', '3')->save(); - $terms_array = ''; + $this->config('taxonomy.settings') + ->set('terms_per_page_admin', '3') + ->save(); // Create 6 terms. - // individual terms for ($x = 1; $x <= 6; $x++) { - $term = $this->createTerm($this->vocabulary); - $terms_array[$x] = Term::load($term->id()); + $this->createTerm($this->vocabulary); } // Get Page 1. $this->drupalGet('admin/structure/taxonomy/manage/' . $this->vocabulary->id() . '/overview'); - $this->assertPattern('|