You are here

public function ContentOverviewTest::test in Lightning Core 8.4

Same name and namespace in other branches
  1. 8.5 modules/lightning_roles/tests/src/Functional/ContentOverviewTest.php \Drupal\Tests\lightning_roles\Functional\ContentOverviewTest::test()
  2. 8.3 modules/lightning_roles/tests/src/Functional/ContentOverviewTest.php \Drupal\Tests\lightning_roles\Functional\ContentOverviewTest::test()

File

modules/lightning_roles/tests/src/Functional/ContentOverviewTest.php, line 23

Class

ContentOverviewTest
@group lightning_core @group lightning @group orca_public

Namespace

Drupal\Tests\lightning_roles\Functional

Code

public function test() {
  $node_type = $this
    ->createContentType()
    ->id();
  $role = Role::load($node_type . '_reviewer');
  $this
    ->assertInstanceOf(Role::class, $role);
  $account = $this
    ->createUser();
  $account
    ->addRole($role
    ->id());
  $account
    ->save();
  $this
    ->drupalLogin($account);
  $this
    ->drupalGet('/admin/content');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}