You are here

public function RngRegistrantRouteTest::testRegistrantCanonicalNoAccess in RNG - Events and Registrations 3.x

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

Test access registrant canonical route.

File

src/Tests/RngRegistrantRouteTest.php, line 131

Class

RngRegistrantRouteTest
Tests registrant routes.

Namespace

Drupal\rng\Tests

Code

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