function PageExampleTest::pageExampleVerifyNoAccess
Same name in other branches
- 4.0.x modules/page_example/tests/src/Functional/PageExampleTest.php \Drupal\Tests\page_example\Functional\PageExampleTest::pageExampleVerifyNoAccess()
Verify that current user has no access to page.
Parameters
string $url: URL to verify.
1 call to PageExampleTest::pageExampleVerifyNoAccess()
- PageExampleTest::testPageExample in modules/
page_example/ tests/ src/ Functional/ PageExampleTest.php - Main test.
File
-
modules/
page_example/ tests/ src/ Functional/ PageExampleTest.php, line 68
Class
- PageExampleTest
- Creates page and render the content based on the arguments passed in the URL.
Namespace
Drupal\Tests\page_example\FunctionalCode
public function pageExampleVerifyNoAccess($url) {
// Test that page returns 403 Access Denied.
$this->drupalGet($url);
$this->assertSession()
->statusCodeEquals(403);
}