function PasswordRequirementsBcryptTest::testRequirementsWithBcrypt
Tests that password hashing generates an info requirement by default.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Password/ PasswordRequirementsBcryptTest.php, line 39
Class
- PasswordRequirementsBcryptTest
- Tests Password System Requirements.
Namespace
Drupal\KernelTests\Core\PasswordCode
public function testRequirementsWithBcrypt() : void {
$requirements = $this->checkSystemRequirements();
$this->assertArrayHasKey('password_hashing', $requirements);
$this->assertSame(RequirementSeverity::Warning, $requirements['password_hashing']['severity']);
$this->assertEquals('Passwords are hashed with the bcrypt algorithm. It is recommended to <a href="https://www.drupal.org/node/3530196">switch</a> to argon2id.', (string) $requirements['password_hashing']['value']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.