2a: Admin page access for anonymous users

Ensure that anonymous users cannot access the site’s administration
pages.
This commit is contained in:
Oliver Davies 2020-03-19 20:39:37 +00:00
parent fd921d3e4c
commit 7e0a0c3762

View file

@ -18,4 +18,11 @@ class MyModuleTest extends BrowserTestBase {
$this->assertResponse(Response::HTTP_OK); $this->assertResponse(Response::HTTP_OK);
} }
/** @test */
public function the_admin_page_is_not_accessible_to_anonymous_users() {
$this->drupalGet('admin');
$this->assertResponse(Response::HTTP_FORBIDDEN);
}
} }