public function AccessThemeBrowserTest::testIfAccessDeniedThemeBartik in Theme permission 8
Same name and namespace in other branches
- 2.0.x tests/src/Functional/AccessThemeBrowserTest.php \Drupal\Tests\theme_permission\Functional\AccessThemeBrowserTest::testIfAccessDeniedThemeBartik()
Check if user don't access to Bartik theme.
File
- tests/
src/ Functional/ AccessThemeBrowserTest.php, line 28
Class
- AccessThemeBrowserTest
- Administration theme access check.
Namespace
Drupal\Tests\theme_permission\FunctionalCode
public function testIfAccessDeniedThemeBartik() {
$this
->userLogin();
$this
->drupalGet(Url::fromRoute('system.theme_settings_theme', [
'theme' => 'bartik',
]));
$this
->assertSession()
->statusCodeEquals(403);
}