Commit 60d4bd86 authored by alexpott's avatar alexpott
Browse files

Issue #2469269 by Berdir: Don't use a form submission to check the password in MigrateUserTest

parent 6c355688
......@@ -177,12 +177,9 @@ public function testUser() {
$this->assertIdentical(basename($source->picture), $file->getFilename());
}
// Use the UI to check if the password has been salted and re-hashed to
// Use the API to check if the password has been salted and re-hashed to
// conform the Drupal >= 7.
$credentials = array('name' => $source->name, 'pass' => $source->pass_plain);
$this->drupalPostForm('user/login', $credentials, t('Log in'));
$this->assertNoRaw(t('Sorry, unrecognized username or password. <a href="@password">Have you forgotten your password?</a>', array('@password' => \Drupal::url('user.pass', [], array('query' => array('name' => $source->name))))));
$this->drupalLogout();
$this->assertTrue(\Drupal::service('password')->check($source->pass_plain, $user));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment