function PathTaxonomyTermTest::setUp

Same name in other branches
  1. 9 core/modules/path/tests/src/Functional/PathTaxonomyTermTest.php \Drupal\Tests\path\Functional\PathTaxonomyTermTest::setUp()
  2. 8.9.x core/modules/path/tests/src/Functional/PathTaxonomyTermTest.php \Drupal\Tests\path\Functional\PathTaxonomyTermTest::setUp()
  3. 10 core/modules/path/tests/src/Functional/PathTaxonomyTermTest.php \Drupal\Tests\path\Functional\PathTaxonomyTermTest::setUp()

Overrides PathTestBase::setUp

File

core/modules/path/tests/src/Functional/PathTaxonomyTermTest.php, line 29

Class

PathTaxonomyTermTest
Tests URL aliases for taxonomy terms.

Namespace

Drupal\Tests\path\Functional

Code

protected function setUp() : void {
    parent::setUp();
    // Create a Tags vocabulary for the Article node type.
    $vocabulary = Vocabulary::create([
        'name' => 'Tags',
        'vid' => 'tags',
    ]);
    $vocabulary->save();
    // Create and log in user.
    $web_user = $this->drupalCreateUser([
        'administer url aliases',
        'administer taxonomy',
        'access administration pages',
    ]);
    $this->drupalLogin($web_user);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.