diff --git a/core/modules/system/lib/Drupal/system/Tests/Upgrade/UserRoleUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/UserRoleUpgradePathTest.php index c4e2193..a58da9d 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Upgrade/UserRoleUpgradePathTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/UserRoleUpgradePathTest.php @@ -40,8 +40,9 @@ public function testRoleUpgrade() { // Check that "gärtner" has been converted to "4" and that the role // edit page for it exists. $this->drupalGet('admin/people/roles/manage/4'); + $this->assertResponse(200, 'Role edit page for "gärtner" was found.'); + $this->assertField('label', 'Role edit page for "gärtner" was found.'); $this->assertRaw('gärtner', 'Role edit page for "gärtner" was found.'); - $this->assertResponse(200); // Check that the anonymous user role ID has been converted from "1" to // "anonymous". diff --git a/core/modules/user/lib/Drupal/user/Form/UserRoleDelete.php b/core/modules/user/lib/Drupal/user/Form/UserRoleDelete.php index 3a65cd2..fdfce4e 100644 --- a/core/modules/user/lib/Drupal/user/Form/UserRoleDelete.php +++ b/core/modules/user/lib/Drupal/user/Form/UserRoleDelete.php @@ -20,7 +20,7 @@ class UserRoleDelete extends ConfirmFormBase { * * @var \Drupal\user\Plugin\Core\Entity\Role */ - protected $user_role; + protected $role; /** * {@inheritdoc} @@ -33,7 +33,7 @@ public function getFormID() { * {@inheritdoc} */ protected function getQuestion() { - return t('Are you sure you want to delete the role %name?', array('%name' => $this->user_role->label())); + return t('Are you sure you want to delete the role %name?', array('%name' => $this->role->label())); } /** @@ -52,9 +52,11 @@ protected function getConfirmText() { /** * {@inheritdoc} + * @param \Drupal\user\Plugin\Core\Entity\Role $user_role + * The role being deleted. */ public function buildForm(array $form, array &$form_state, Role $user_role = NULL) { - $this->user_role = $user_role; + $this->role = $user_role; return parent::buildForm($form, $form_state); } @@ -62,9 +64,9 @@ public function buildForm(array $form, array &$form_state, Role $user_role = NUL * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) { - $this->user_role->delete(); - watchdog('user', 'Role %name has been deleted.', array('%name' => $this->user_role->label())); - drupal_set_message(t('Role %name has been deleted.', array('%name' => $this->user_role->label()))); + $this->role->delete(); + watchdog('user', 'Role %name has been deleted.', array('%name' => $this->role->label())); + drupal_set_message(t('Role %name has been deleted.', array('%name' => $this->role->label()))); $form_state['redirect'] = 'admin/people/roles'; } diff --git a/core/modules/user/lib/Drupal/user/RoleAccessController.php b/core/modules/user/lib/Drupal/user/RoleAccessController.php index 290bf63..3fe0100 100644 --- a/core/modules/user/lib/Drupal/user/RoleAccessController.php +++ b/core/modules/user/lib/Drupal/user/RoleAccessController.php @@ -12,7 +12,7 @@ use Drupal\user\Plugin\Core\Entity\User; /** - * Defines the access controller for the user entity type. + * Defines the access controller for the user_role entity type. */ class RoleAccessController extends EntityAccessController {