You are here

private function AdminFormTest::assertNonAdminsCannotAccessForm in Gatsby Live Preview & Incremental Builds 8

Same name and namespace in other branches
  1. 2.0.x tests/src/Functional/AdminFormTest.php \Drupal\Tests\gatsby\Functional\AdminFormTest::assertNonAdminsCannotAccessForm()

Assert non admins can't access the form.

1 call to AdminFormTest::assertNonAdminsCannotAccessForm()
AdminFormTest::testAdminFormValidation in tests/src/Functional/AdminFormTest.php
Tests admin form validation.

File

tests/src/Functional/AdminFormTest.php, line 119

Class

AdminFormTest
Defines a test for GatsbyAdminForm.

Namespace

Drupal\Tests\gatsby\Functional

Code

private function assertNonAdminsCannotAccessForm() {
  $this
    ->drupalGet($this->formUrl);
  $this
    ->assertSession()
    ->statusCodeEquals(403);
}