function PasswordHashingTest::testPasswordNeedsUpdate
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php \Drupal\Tests\Core\Password\PasswordHashingTest::testPasswordNeedsUpdate()
Test a password needs update.
@covers ::needsRehash
File
-
core/
tests/ Drupal/ Tests/ Core/ Password/ PasswordHashingTest.php, line 84
Class
- PasswordHashingTest
- Unit tests for password hashing API.
Namespace
Drupal\Tests\Core\PasswordCode
public function testPasswordNeedsUpdate() {
// The md5 password should be flagged as needing an update.
$this->assertTrue($this->passwordHasher
->needsRehash($this->md5HashedPassword), 'Upgraded md5 password hash needs a new hash.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.