You are here

protected function XmlSitemapTaxonomyFunctionalTest::setUp in XML sitemap 2.x

Same name and namespace in other branches
  1. 8 tests/src/Functional/XmlSitemapTaxonomyFunctionalTest.php \Drupal\Tests\xmlsitemap\Functional\XmlSitemapTaxonomyFunctionalTest::setUp()

Overrides XmlSitemapTestBase::setUp

File

tests/src/Functional/XmlSitemapTaxonomyFunctionalTest.php, line 23

Class

XmlSitemapTaxonomyFunctionalTest
Tests the generation of taxonomy links.

Namespace

Drupal\Tests\xmlsitemap\Functional

Code

protected function setUp() {
  parent::setUp();

  // Add a vocabulary.
  $vocabulary = Vocabulary::create([
    'name' => 'Tags',
    'description' => $this
      ->randomMachineName(),
    'vid' => 'tags',
    'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
    'help' => '',
  ]);
  $vocabulary
    ->save();
  $this->admin_user = $this
    ->drupalCreateUser([
    'administer taxonomy',
    'administer xmlsitemap',
  ]);
}