You are here

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

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

Overrides XmlSitemapTestBase::setUp

File

tests/src/Functional/XmlSitemapEntityFunctionalTest.php, line 24

Class

XmlSitemapEntityFunctionalTest
Tests the generation of a random content entity links.

Namespace

Drupal\Tests\xmlsitemap\Functional

Code

protected function setUp() {
  parent::setUp();
  $this->admin_user = $this
    ->drupalCreateUser([
    'administer entity_test content',
    'administer xmlsitemap',
  ]);

  // Allow anonymous users to view test entities.
  $user_role = Role::load(AccountInterface::ANONYMOUS_ROLE);
  $user_role
    ->grantPermission('view test entity');
  $user_role
    ->save();
}