function PasswordRequirementsDefaultTest::testRequirementsWithDefaults
Tests that password hashing generates an info requirement by default.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Password/ PasswordRequirementsDefaultTest.php, line 29
Class
- PasswordRequirementsDefaultTest
- Tests Password System Requirements.
Namespace
Drupal\KernelTests\Core\PasswordCode
public function testRequirementsWithDefaults() : void {
$requirements = $this->checkSystemRequirements();
$this->assertArrayHasKey('password_hashing', $requirements);
$this->assertSame(RequirementSeverity::Info, $requirements['password_hashing']['severity']);
$this->assertEquals('Passwords are hashed with the bcrypt algorithm. Drupal 12 will use argon2id by default. It is recommended to <a href="https://www.drupal.org/node/3581980">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.