diff -u b/core/modules/taxonomy/src/Tests/VocabularyPermissionsTest.php b/core/modules/taxonomy/src/Tests/VocabularyPermissionsTest.php --- b/core/modules/taxonomy/src/Tests/VocabularyPermissionsTest.php +++ b/core/modules/taxonomy/src/Tests/VocabularyPermissionsTest.php @@ -91,16 +91,16 @@ // Visit the main taxonomy administration page. $this->drupalGet('admin/structure/taxonomy/manage/' . $vocabulary->id() . '/add'); $this->assertResponse(200); - $this->assertField('edit-name', 'Add taxonomy term form opened successfully.'); + $this->assertFieldByName('name[0][value]', NULL, 'Add taxonomy term form opened successfully.'); // Submit the term. $edit = array(); - $edit['name'] = $this->randomMachineName(); + $edit['name[0][value]'] = $this->randomMachineName(); - $this->drupalPost(NULL, t('Save'), $edit); - $this->assertRaw(t('Created new term %name.', ['%name' => $edit['name']]), 'Term created successfully.'); + $this->drupalPostForm(NULL, $edit, t('Save')); + $this->assertRaw(t('Created new term %name.', ['%name' => $edit['name[0][value]']]), 'Term created successfully.'); - $terms = taxonomy_term_load_multiple_by_name($edit['name']); + $terms = taxonomy_term_load_multiple_by_name($edit['name[0][value]']); $term = reset($terms); // Edit the term. @@ -128,7 +128,7 @@ $this->assertText($term->getName(), 'Edit taxonomy term form opened successfully.'); $edit['name[0][value]'] = $this->randomMachineName(); - $this->drupalPost(NULL, t('Save'), $edit); + $this->drupalPostForm(NULL, $edit, t('Save')); $this->assertRaw(t('Updated term %name.', array('%name' => $edit['name[0][value]'])), 'Term updated successfully.'); // Delete the vocabulary.