You are here

protected function FlagTestBase::setUp in Flag 8.4

Overrides BrowserTestBase::setUp

5 calls to FlagTestBase::setUp()
AdminUITest::setUp in tests/src/Functional/AdminUITest.php
LinkOutputLocationTest::setUp in tests/src/Functional/LinkOutputLocationTest.php
LinkOwnershipAccessTest::setUp in tests/src/Functional/LinkOwnershipAccessTest.php
LinkTypeAjaxTest::setUp in tests/src/Functional/LinkTypeAjaxTest.php
LinkTypeFieldEntryTest::setUp in tests/src/Functional/LinkTypeFieldEntryTest.php
5 methods override FlagTestBase::setUp()
AdminUITest::setUp in tests/src/Functional/AdminUITest.php
LinkOutputLocationTest::setUp in tests/src/Functional/LinkOutputLocationTest.php
LinkOwnershipAccessTest::setUp in tests/src/Functional/LinkOwnershipAccessTest.php
LinkTypeAjaxTest::setUp in tests/src/Functional/LinkTypeAjaxTest.php
LinkTypeFieldEntryTest::setUp in tests/src/Functional/LinkTypeFieldEntryTest.php

File

tests/src/Functional/FlagTestBase.php, line 49

Class

FlagTestBase
Provides common methods for Flag tests.

Namespace

Drupal\Tests\flag\Functional

Code

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

  // Get the Flag Service.
  $this->flagService = \Drupal::service('flag');

  // Place the title block, otherwise some tests fail.
  $this
    ->drupalPlaceBlock('page_title_block', [
    'region' => 'content',
  ]);

  // Create content type.
  $this
    ->drupalCreateContentType([
    'type' => $this->nodeType,
  ]);

  // Create the admin user.
  $this->adminUser = $this
    ->createUser([
    'administer flags',
    'administer flagging display',
    'administer flagging fields',
    'administer node display',
    'administer modules',
    'administer nodes',
    'create ' . $this->nodeType . ' content',
    'edit any ' . $this->nodeType . ' content',
    'delete any ' . $this->nodeType . ' content',
  ]);
}