comparison core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php @ 12:7a779792577d

Update Drupal core to v8.4.5 (via Composer)
author Chris Cannam
date Fri, 23 Feb 2018 15:52:07 +0000
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
11:bfffd8d7479a 12:7a779792577d
19 19
20 /** 20 /**
21 * Tests that a user can be assigned a role and that the role can be removed 21 * Tests that a user can be assigned a role and that the role can be removed
22 * again. 22 * again.
23 */ 23 */
24 public function testAssignAndRemoveRole() { 24 public function testAssignAndRemoveRole() {
25 $rid = $this->drupalCreateRole(['administer users']); 25 $rid = $this->drupalCreateRole(['administer users']);
26 $account = $this->drupalCreateUser(); 26 $account = $this->drupalCreateUser();
27 27
28 // Assign the role to the user. 28 // Assign the role to the user.
29 $this->drupalPostForm('user/' . $account->id() . '/edit', ["roles[$rid]" => $rid], t('Save')); 29 $this->drupalPostForm('user/' . $account->id() . '/edit', ["roles[$rid]" => $rid], t('Save'));