comparison core/modules/user/tests/src/Functional/UserRoleAdminTest.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
115 } 115 }
116 $this->drupalPostForm('admin/people/roles', $edit, t('Save')); 116 $this->drupalPostForm('admin/people/roles', $edit, t('Save'));
117 $this->assertText(t('The role settings have been updated.'), 'The role settings form submitted successfully.'); 117 $this->assertText(t('The role settings have been updated.'), 'The role settings form submitted successfully.');
118 118
119 // Load up the user roles with the new weights. 119 // Load up the user roles with the new weights.
120 drupal_static_reset('user_roles');
121 $roles = user_roles(); 120 $roles = user_roles();
122 $rids = []; 121 $rids = [];
123 // Test that the role weights have been correctly saved. 122 // Test that the role weights have been correctly saved.
124 foreach ($roles as $role) { 123 foreach ($roles as $role) {
125 $this->assertEqual($role->getWeight(), $new_role_weights[$role->id()]); 124 $this->assertEqual($role->getWeight(), $new_role_weights[$role->id()]);