You are here

protected function ModalFormTest::setUp in Flag 8.4

Overrides BrowserTestBase::setUp

File

tests/src/FunctionalJavascript/ModalFormTest.php, line 66

Class

ModalFormTest
Tests modal form options for action link plugins.

Namespace

Drupal\Tests\flag\FunctionalJavascript

Code

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

  // A test flag.
  $this->flag = $this
    ->createFlag('node', [], 'confirm');
  $this->flagService = $this->container
    ->get('flag');

  // A node to test with.
  $this->admin = $this
    ->createUser([], NULL, TRUE);
  $type = $this
    ->createContentType();
  $this->node = $this
    ->createNode([
    'type' => $type
      ->id(),
    'uid' => $this->admin
      ->id(),
  ]);
  $this->webUser = $this
    ->createUser(array_keys($this->flag
    ->actionPermissions()));
  $this
    ->drupalLogin($this->webUser);
}