You are here

public function FlagCountExtensionTest::setUp in Flag 8.4

Overrides BrowserTestBase::setUp

File

tests/src/FunctionalJavascript/FlagCountExtensionTest.php, line 36

Class

FlagCountExtensionTest
Browser tests for the flag.twig.count service.

Namespace

Drupal\Tests\flag\FunctionalJavascript

Code

public function setUp() {
  parent::setUp();
  $this
    ->drupalCreateContentType([
    'type' => 'article',
    'name' => 'Article',
  ]);

  // Set the linkTypePlugin of the flag to count_link for running the tests.
  $flag_service = \Drupal::service('flag');
  $bookmark_flag = $flag_service
    ->getFlagById('bookmark');
  $bookmark_flag
    ->setlinkTypePlugin('count_link');
  $bookmark_flag
    ->save();
}