public function PasswordHashingTest::testPasswordNeedsUpdate in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php \Drupal\Tests\Core\Password\PasswordHashingTest::testPasswordNeedsUpdate()
Tests a password needs update.
@covers ::needsRehash
File
- core/
tests/ Drupal/ Tests/ Core/ Password/ PasswordHashingTest.php, line 84 - Contains \Drupal\Tests\Core\Password\PasswordHashingTest.
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.');
}