public function CacheFlushTest::menuAccessAnonymusUser in CacheFlush 8
Check menus access.
1 call to CacheFlushTest::menuAccessAnonymusUser()
- CacheFlushTest::testMenu in tests/
src/ Functional/ CacheFlushTest.php - Run test functions.
File
- tests/
src/ Functional/ CacheFlushTest.php, line 72
Class
- CacheFlushTest
- Test cacheflush API.
Namespace
Drupal\Tests\cacheflush\FunctionalCode
public function menuAccessAnonymusUser() {
// Check access of the menus - access denied expected - Anonymus user.
$this
->drupalGet('admin/cacheflush');
$this
->assertResponse(403);
$this
->drupalGet('admin/cacheflush/clear/all');
$this
->assertResponse(403);
// No entity created yet, the route will try to load entity - 404 will be
// returned by Entity Manager.
$this
->drupalGet('admin/cacheflush/clear/1');
$this
->assertResponse(404);
}