You are here

protected function MetatagTagsTestBase::setUp in Metatag 8

Overrides BrowserTestBase::setUp

1 call to MetatagTagsTestBase::setUp()
MetatagHreflangTagsTest::setUp in metatag_hreflang/tests/src/Functional/MetatagHreflangTagsTest.php
1 method overrides MetatagTagsTestBase::setUp()
MetatagHreflangTagsTest::setUp in metatag_hreflang/tests/src/Functional/MetatagHreflangTagsTest.php

File

tests/src/Functional/MetatagTagsTestBase.php, line 72

Class

MetatagTagsTestBase
Base class to test all of the meta tags that are in a specific module.

Namespace

Drupal\Tests\metatag\Functional

Code

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

  // Use the test page as the front page.
  $this
    ->config('system.site')
    ->set('page.front', '/test-page')
    ->save();

  // Initiate session with a user who can manage meta tags and access content.
  $permissions = [
    'administer site configuration',
    'administer meta tags',
    'access content',
  ];
  $account = $this
    ->drupalCreateUser($permissions);
  $this
    ->drupalLogin($account);
}