protected function XmlSitemapEntityFunctionalTest::setUp in XML sitemap 8
Same name and namespace in other branches
- 2.x 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\FunctionalCode
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();
}