function PasswordRequirementsUnknownTest::testRequirementsWithUnknownAlgorithm
Tests that password hashing generates an info requirement by default.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Password/ PasswordRequirementsUnknownTest.php, line 44
Class
- PasswordRequirementsUnknownTest
- Tests Password System Requirements.
Namespace
Drupal\KernelTests\Core\PasswordCode
public function testRequirementsWithUnknownAlgorithm() : void {
$requirements = $this->checkSystemRequirements();
$this->assertArrayHasKey('password_hashing', $requirements);
$this->assertSame(RequirementSeverity::Error, $requirements['password_hashing']['severity']);
$this->assertEquals('The configured password hashing algorithm <em class="placeholder">vogon poetry</em> is not available in your PHP installation. Ensure that the <a href="https://www.php.net/manual/password.requirements.php">necessary PHP extensions</a> are installed and that the Drupal password hashing configuration is correct.', (string) $requirements['password_hashing']['value']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.