diff --git a/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php b/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php index 58aed6d..45ff540 100644 --- a/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php +++ b/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php @@ -50,7 +50,7 @@ function createVocabulary() { /** * Returns a new term with random properties in vocabulary $vid. */ - function createTerm($vocabulary, $values=array()) { + function createTerm($vocabulary, $values = array()) { $filter_formats = filter_formats(); $format = array_pop($filter_formats); $term = entity_create('taxonomy_term', $values + array( diff --git a/core/modules/taxonomy/src/Tests/TermTest.php b/core/modules/taxonomy/src/Tests/TermTest.php index cc452ff..0762d3f 100644 --- a/core/modules/taxonomy/src/Tests/TermTest.php +++ b/core/modules/taxonomy/src/Tests/TermTest.php @@ -117,32 +117,28 @@ function testTaxonomyTermChildTerms() { if ($x <= 12) { $edit['parent'] = $term1->id(); } - else - { - $edit['parent'] = 0; - } - $term = $this->createTerm($this->vocabulary,$edit); + $term = $this->createTerm($this->vocabulary, $edit); $children = taxonomy_term_load_children($term1->id()); $parents = taxonomy_term_load_parents($term->id()); $terms_array[$x] = taxonomy_term_load($term->id()); } // Get Page 1. - $this->drupalGet('admin/structure/taxonomy/manage/' . $this->vocabulary->id()."/overview"); + $this->drupalGet('admin/structure/taxonomy/manage/' . $this->vocabulary->id() . "/overview"); $this->assertText($term1->getName(), 'Parent Term is displayed on Page 1'); for ($x = 1; $x <= 13; $x++) { $this->assertText($terms_array[$x]->getName(), $terms_array[$x]->getName() . ' found on Page 1'); } // Get Page 2. - $this->drupalGet('admin/structure/taxonomy/manage/' . $this->vocabulary->id()."/overview", array('query' => array('page' => 1))); + $this->drupalGet('admin/structure/taxonomy/manage/' . $this->vocabulary->id() . "/overview", array('query' => array('page' => 1))); $this->assertText($term1->getName(), 'Parent Term is displayed on Page 2'); for ($x = 1; $x <= 18; $x++) { $this->assertText($terms_array[$x]->getName(), $terms_array[$x]->getName() . ' found on Page 2'); } // Get Page 3. - $this->drupalGet('admin/structure/taxonomy/manage/' . $this->vocabulary->id()."/overview", array('query' => array('page' => 2))); + $this->drupalGet('admin/structure/taxonomy/manage/' . $this->vocabulary->id() . "/overview", array('query' => array('page' => 2))); $this->assertNoText($term1->getName(), 'Parent Term is not displayed on Page 3'); for ($x = 1; $x <= 17; $x++) { $this->assertNoText($terms_array[$x]->getName(), $terms_array[$x]->getName() . ' not found on Page 3');