You are here

protected function XmlSitemapRebuildTest::setUp in XML sitemap 8

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

Overrides XmlSitemapTestBase::setUp

File

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

Class

XmlSitemapRebuildTest
Tests the rebuild process of sitemaps.

Namespace

Drupal\Tests\xmlsitemap\Functional

Code

protected function setUp() {
  parent::setUp();
  $this->admin_user = $this
    ->drupalCreateUser([
    'administer xmlsitemap',
    'access administration pages',
    'access site reports',
    'administer users',
    'administer permissions',
  ]);
  $this
    ->drupalPlaceBlock('help_block', [
    'region' => 'help',
  ]);

  // Allow anonymous user to view user profiles.
  $user_role = Role::load(AccountInterface::ANONYMOUS_ROLE);
  $user_role
    ->grantPermission('access user profiles');
  $user_role
    ->save();
}