You are here

protected function WebTestExtended::checkAccessDenied in Scheduled Updates 8

Utility function to check that current user does not access to a given path.

Parameters

null $path:

1 call to WebTestExtended::checkAccessDenied()
EmbeddedScheduledUpdateTypeTestBase::confirmNoAddForm in tests/src/FunctionalJavascript/EmbeddedScheduledUpdateTypeTestBase.php
Make sure Referenced types do not have a direct add form.

File

tests/src/FunctionalJavascript/WebTestExtended.php, line 174
Contains \Drupal\Tests\scheduled_updates\WebTestExtended.

Class

WebTestExtended
BrowserTestBase plus project agnostic helper functions.

Namespace

Drupal\Tests\scheduled_updates\FunctionalJavascript

Code

protected function checkAccessDenied($path = NULL) {
  if ($path) {
    $this
      ->drupalGet($path);
  }

  // 'Accessed denied on path: ' . $path
  $this
    ->assertSession()
    ->pageTextContains('Access denied');
}