You are here

public function ListControllerTest::setUp in Entity Usage 8

Same name and namespace in other branches
  1. 8.4 tests/src/FunctionalJavascript/ListControllerTest.php \Drupal\Tests\entity_usage\FunctionalJavascript\ListControllerTest::setUp()
  2. 8.2 tests/src/FunctionalJavascript/ListControllerTest.php \Drupal\Tests\entity_usage\FunctionalJavascript\ListControllerTest::setUp()
  3. 8.3 tests/src/FunctionalJavascript/ListControllerTest.php \Drupal\Tests\entity_usage\FunctionalJavascript\ListControllerTest::setUp()

Overrides EntityUsageJavascriptTestBase::setUp

File

tests/src/FunctionalJavascript/ListControllerTest.php, line 20

Class

ListControllerTest
Tests the page listing the usage of a given entity.

Namespace

Drupal\Tests\entity_usage\FunctionalJavascript

Code

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

  // Grant the logged-in user permission to see the statistics page.

  /** @var \Drupal\user\RoleInterface $role */
  $role = Role::load('authenticated');
  $this
    ->grantPermissions($role, [
    'access entity usage statistics',
  ]);
}