function PageTitleTest::setUp

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/System/PageTitleTest.php \Drupal\Tests\system\Functional\System\PageTitleTest::setUp()
  2. 8.9.x core/modules/system/tests/src/Functional/System/PageTitleTest.php \Drupal\Tests\system\Functional\System\PageTitleTest::setUp()
  3. 11.x core/modules/system/tests/src/Functional/System/PageTitleTest.php \Drupal\Tests\system\Functional\System\PageTitleTest::setUp()

Implement setUp().

Overrides BrowserTestBase::setUp

File

core/modules/system/tests/src/Functional/System/PageTitleTest.php, line 35

Class

PageTitleTest
Tests HTML output escaping of page title, site name, and slogan.

Namespace

Drupal\Tests\system\Functional\System

Code

protected function setUp() : void {
    parent::setUp();
    $this->drupalCreateContentType([
        'type' => 'page',
        'name' => 'Basic page',
    ]);
    $this->drupalPlaceBlock('page_title_block');
    $this->contentUser = $this->drupalCreateUser([
        'create page content',
        'access content',
        'administer themes',
        'administer site configuration',
        'link to any page',
    ]);
    $this->drupalLogin($this->contentUser);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.