diff -u b/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php --- b/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php +++ b/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php @@ -23,6 +23,9 @@ */ protected $defaultTheme = 'stark'; + /** + * {@inheritdoc} + */ protected function setUp(): void { parent::setUp(); @@ -37,7 +40,6 @@ public function testVocabularyPermissionsVocabulary() { // VocabularyTest.php already tests for user with "administer taxonomy" // permission. - // Test as user without proper permissions. $authenticated_user = $this->drupalCreateUser([]); $this->drupalLogin($authenticated_user); @@ -231,7 +233,7 @@ // Test as admin user. $user = $this->drupalCreateUser(['administer taxonomy']); - $this->drupalLogin($user); + $this->drupalLogin($this->rootUser); // Visit the main taxonomy administration page. $this->drupalGet('admin/structure/taxonomy/manage/' . $vocabulary->id() . '/add'); @@ -373,8 +375,7 @@ } /** - * Check if destination query present and redirection is happening - * back to overview. + * Tests the redirection after adding a term. */ public function testVocabularyRedirectWithDestination() { $vocabulary = $this->createVocabulary(); @@ -386,7 +387,7 @@ $this->drupalGet('admin/structure/taxonomy/manage/' . $vocabulary->id() . '/overview'); $this->assertSession()->statusCodeEquals(200); $this->assertSession()->pageTextContains('Add term'); - $this->clickLink(t('Add term')); + $this->clickLink('Add term'); $this->assertSession()->addressEquals('admin/structure/taxonomy/manage/' . $vocabulary->id() . '/add'); $this->assertSession()->statusCodeEquals(200); // Submit the term.