You are here

public function MassPasswordChange::testAdminUserMassPasswordChange in Mass Password Change 8

Test Password change function for Admin (uid=1) user.

File

tests/src/Functional/MassPasswordChange.php, line 15

Class

MassPasswordChange
Test the change password function.

Namespace

Drupal\Tests\mass_password_change\Functional

Code

public function testAdminUserMassPasswordChange() {
  $admin_user_weight = $this
    ->getUserWeightFromAccountsArray($this->accounts, 1);
  $this
    ->drupalGet('/admin/people');
  $edit = [
    'action' => 'mass_password_change_action',
    "user_bulk_form[{$admin_user_weight}]" => TRUE,
  ];
  $this
    ->drupalPostForm(NULL, $edit, 'Apply to selected items');
  $this
    ->assertText('No access to execute Change password the selected user(s) on the User admin.');
}