You are here

protected function PageManagerAdminTest::setUp in Page Manager 8.4

Same name in this branch
  1. 8.4 page_manager_ui/tests/src/Functional/PageManagerAdminTest.php \Drupal\Tests\page_manager_ui\Functional\PageManagerAdminTest::setUp()
  2. 8.4 page_manager_ui/tests/src/FunctionalJavascript/PageManagerAdminTest.php \Drupal\Tests\page_manager_ui\FunctionalJavascript\PageManagerAdminTest::setUp()

Overrides BrowserTestBase::setUp

File

page_manager_ui/tests/src/FunctionalJavascript/PageManagerAdminTest.php, line 29

Class

PageManagerAdminTest
Tests the admin UI for page entities.

Namespace

Drupal\Tests\page_manager_ui\FunctionalJavascript

Code

protected function setUp() {
  parent::setUp();
  $this
    ->drupalPlaceBlock('local_tasks_block');
  $this
    ->drupalPlaceBlock('local_actions_block');
  $this
    ->drupalPlaceBlock('system_branding_block');
  $this
    ->drupalPlaceBlock('page_title_block');
  \Drupal::service('theme_installer')
    ->install([
    'bartik',
  ]);
  $this
    ->config('system.theme')
    ->set('admin', 'classy')
    ->save();
  $this
    ->drupalLogin($this
    ->drupalCreateUser([
    'administer pages',
    'access administration pages',
    'view the administration theme',
  ]));

  // Remove the default node_view page to start with a clean UI.
  Page::load('node_view')
    ->delete();
}