You are here

protected function PathTaxonomyTermTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 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 26

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' => t('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);
}