public function MassPasswordChange::testCurrentUserMassPasswordChange in Mass Password Change 8
Test Password change function for current user.
File
- tests/
src/ Functional/ MassPasswordChange.php, line 29
Class
- MassPasswordChange
- Test the change password function.
Namespace
Drupal\Tests\mass_password_change\FunctionalCode
public function testCurrentUserMassPasswordChange() {
$current_user_weight = $this
->getUserWeightFromAccountsArray($this->accounts, $this->adminUser
->id());
$this
->drupalGet('/admin/people');
$edit = [
'action' => 'mass_password_change_action',
"user_bulk_form[{$current_user_weight}]" => TRUE,
];
$this
->drupalPostForm(NULL, $edit, 'Apply to selected items');
$this
->assertText(sprintf("No access to execute Change password the selected user(s) on the User %s.", $this->adminUser
->getAccountName()));
}