You are here

protected function PathTaxonomyTermTest::setUp in Drupal 8

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

Class

PathTaxonomyTermTest
Tests URL aliases for taxonomy terms.

Namespace

Drupal\Tests\path\Functional

Code

protected function setUp() {
  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);
}