You are here

protected function LinkTypeAjaxTest::setUp in Flag 8.4

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

Overrides BrowserTestBase::setUp

File

tests/src/FunctionalJavascript/LinkTypeAjaxTest.php, line 65

Class

LinkTypeAjaxTest
Javascript test for ajax links.

Namespace

Drupal\Tests\flag\FunctionalJavascript

Code

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

  // Get the Flag Service.
  $this->flagService = $this->container
    ->get('flag');

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

  // Create the admin user.
  $this->adminUser = $this
    ->createUser([], NULL, TRUE);
  $this->flag = $this
    ->createFlag('node', [], 'ajax_link');
  $this->node = $this
    ->drupalCreateNode([
    'type' => $this->nodeType,
  ]);
}