You are here

function RngRegistrantRouteTest::testRegistrantEditRouteNoAccess in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/Tests/RngRegistrantRouteTest.php \Drupal\rng\Tests\RngRegistrantRouteTest::testRegistrantEditRouteNoAccess()
  2. 3.x src/Tests/RngRegistrantRouteTest.php \Drupal\rng\Tests\RngRegistrantRouteTest::testRegistrantEditRouteNoAccess()

Test access edit registrant form with no permission.

File

src/Tests/RngRegistrantRouteTest.php, line 166

Class

RngRegistrantRouteTest
Tests registrant routes.

Namespace

Drupal\rng\Tests

Code

function testRegistrantEditRouteNoAccess() {
  $admin = $this
    ->drupalCreateUser();
  $this
    ->drupalLogin($admin);
  $this
    ->drupalGet(Url::fromRoute('entity.registrant.edit_form', [
    'registrant' => $this->registrant
      ->id(),
  ]));
  $this
    ->assertResponse(403);
}