You are here

protected function ThemeTest::setUp in Drupal 8

Same name in this branch
  1. 8 core/modules/taxonomy/tests/src/Functional/ThemeTest.php \Drupal\Tests\taxonomy\Functional\ThemeTest::setUp()
  2. 8 core/modules/system/tests/src/Functional/System/ThemeTest.php \Drupal\Tests\system\Functional\System\ThemeTest::setUp()
  3. 8 core/modules/system/tests/src/Functional/Theme/ThemeTest.php \Drupal\Tests\system\Functional\Theme\ThemeTest::setUp()
  4. 8 core/modules/system/tests/src/Kernel/Theme/ThemeTest.php \Drupal\Tests\system\Kernel\Theme\ThemeTest::setUp()
Same name and namespace in other branches
  1. 9 core/modules/system/tests/src/Functional/System/ThemeTest.php \Drupal\Tests\system\Functional\System\ThemeTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/system/tests/src/Functional/System/ThemeTest.php, line 41

Class

ThemeTest
Tests the theme interface functionality by enabling and switching themes, and using an administration theme.

Namespace

Drupal\Tests\system\Functional\System

Code

protected function setUp() {
  parent::setUp();
  $this
    ->drupalCreateContentType([
    'type' => 'page',
    'name' => 'Basic page',
  ]);
  $this->adminUser = $this
    ->drupalCreateUser([
    'access administration pages',
    'view the administration theme',
    'administer themes',
    'bypass node access',
    'administer blocks',
  ]);
  $this
    ->drupalLogin($this->adminUser);
  $this->node = $this
    ->drupalCreateNode();
  $this
    ->drupalPlaceBlock('local_tasks_block');
}