You are here

protected function WorkbenchAccessTestTrait::assertThatUnprivilegedUsersCannotAccessAdminPages in Workbench Access 8

Assert that unprivileged users cannot access admin pages.

2 calls to WorkbenchAccessTestTrait::assertThatUnprivilegedUsersCannotAccessAdminPages()
MenuSchemeUITest::testSchemeUi in tests/src/Functional/MenuSchemeUITest.php
Tests scheme UI.
TaxonomySchemeUITest::testSchemeUi in tests/src/Functional/TaxonomySchemeUITest.php
Tests scheme UI.

File

tests/src/Traits/WorkbenchAccessTestTrait.php, line 212

Class

WorkbenchAccessTestTrait
Contains helper classes for tests to set up various configuration.

Namespace

Drupal\Tests\workbench_access\Traits

Code

protected function assertThatUnprivilegedUsersCannotAccessAdminPages() {
  $this
    ->drupalGet(Url::fromRoute('entity.access_scheme.collection'));
  $assert = $this
    ->assertSession();
  $assert
    ->statusCodeEquals(403);
}