protected function ThemePermissionTestBase::userLogin in Theme permission 2.0.x
Same name and namespace in other branches
- 8 tests/src/Functional/ThemePermissionTestBase.php \Drupal\Tests\theme_permission\Functional\ThemePermissionTestBase::userLogin()
Drupal User login.
Parameters
array $permissions: User permission.
Throws
\Drupal\Core\Entity\EntityStorageException
9 calls to ThemePermissionTestBase::userLogin()
- AccessBlockBrowserTest::testIfAccessDeniedThemeBartik in tests/
src/ Functional/ AccessBlockBrowserTest.php - Check if user don't access to Bartik blocks configuration.
- AccessBlockBrowserTest::testIfAccessThemeBartik in tests/
src/ Functional/ AccessBlockBrowserTest.php - Check if user access to Bartik blocks configuration.
- AccessBlockBrowserTest::testIfNotShowSeven in tests/
src/ Functional/ AccessBlockBrowserTest.php - Check if block list don't contain seven url.
- AccessBlockBrowserTest::testIfShowSeven in tests/
src/ Functional/ AccessBlockBrowserTest.php - Check if block list contain seven url.
- AccessThemeBrowserTest::testEditAdminTheme in tests/
src/ Functional/ AccessThemeBrowserTest.php - Check if the user accesses "Edit Administration theme".
File
- tests/
src/ Functional/ ThemePermissionTestBase.php, line 59
Class
- ThemePermissionTestBase
- Administration theme access check.
Namespace
Drupal\Tests\theme_permission\FunctionalCode
protected function userLogin(array $permissions = NULL) {
$permissions = isset($permissions) ? $permissions : [];
$userPermission = array_merge($permissions, [
'administer themes',
'administer blocks',
]);
$user = $this
->drupalCreateUser($userPermission);
$this
->drupalLogin($user);
}