Skip to content

Commit

Permalink
Merge pull request #124 from Berdir/patch-1
Browse files Browse the repository at this point in the history
Support 'authenticated' as role name for authenticated user role
  • Loading branch information
jhedstrom committed Dec 23, 2014
2 parents 9509b76 + f836675 commit 585f289
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Drupal/DrupalExtension/Context/DrupalContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function assertAuthenticatedByRole($role) {
$roles = explode(',', $role);
$roles = array_map('trim', $roles);
foreach ($roles as $role) {
if ($role != 'authenticated user') {
if (!in_array(strtolower($role), ['authenticated', 'authenticated user'])) {
// Only add roles other than 'authenticated user'.
$this->getDriver()->userAddRole($user, $role);
}
Expand Down

1 comment on commit 585f289

@koschos
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is an issue with short array syntax. I created issue #126

Please, fix it, it is very important for our team!!!
We still works on php 5.3)

Please sign in to comment.