diff --git a/core/modules/taxonomy/src/Tests/TermTest.php b/core/modules/taxonomy/src/Tests/TermTest.php index 5568367..1806d36 100644 --- a/core/modules/taxonomy/src/Tests/TermTest.php +++ b/core/modules/taxonomy/src/Tests/TermTest.php @@ -117,36 +117,36 @@ function testTaxonomyTermChildTerms() { // Set terms 1-20 to be children of first term created. if ($x <= 12) { - $edit['parent[]'] = $term1->tid; + $edit['parent[]'] = $term1->id(); } - $this->drupalPost('taxonomy/term/' . $term->tid . '/edit', $edit, t('Save')); - $children = taxonomy_term_load_children($term1->tid); - $parents = taxonomy_term_load_parents($term->tid); - $terms_array[$x] = taxonomy_term_load($term->tid); + $this->drupalPostForm('taxonomy/term/' . $term->id() . '/edit', $edit, t('Save')); + $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/' . $this->vocabulary->machine_name); - $this->assertText($term1->name, 'Parent Term is displayed on Page 1'); + $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]->name, $terms_array[$x]->name . ' found on Page 1'); + $this->assertText($terms_array[$x]->getName(), $terms_array[$x]->getName() . ' found on Page 1'); } // Get Page 2. - $this->drupalGet('admin/structure/taxonomy/' . $this->vocabulary->machine_name, array('query' => array('page' => 1))); - $this->assertText($term1->name, 'Parent Term is displayed on Page 2'); + $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]->name, $terms_array[$x]->name . ' found on Page 2'); + $this->assertText($terms_array[$x]->getName(), $terms_array[$x]->getName() . ' found on Page 2'); } // Get Page 3. - $this->drupalGet('admin/structure/taxonomy/' . $this->vocabulary->machine_name, array('query' => array('page' => 2))); - $this->assertNoText($term1->name, 'Parent Term is not displayed on Page 3'); + $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]->name, $terms_array[$x]->name . ' not found on Page 3'); + $this->assertNoText($terms_array[$x]->getName(), $terms_array[$x]->getName() . ' not found on Page 3'); } for ($x =18; $x <= 25; $x++) { - $this->assertText($terms_array[$x]->name, $terms_array[$x]->name . ' found on Page 3'); + $this->assertText($terms_array[$x]->getName(), $terms_array[$x]->getName() . ' found on Page 3'); } }