public function PasswordHashingTest::testLongPassword in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php \Drupal\Tests\Core\Password\PasswordHashingTest::testLongPassword()
- 9 core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php \Drupal\Tests\Core\Password\PasswordHashingTest::testLongPassword()
Verifies that passwords longer than 512 bytes are not hashed.
@covers ::crypt
@dataProvider providerLongPasswords
File
- core/
tests/ Drupal/ Tests/ Core/ Password/ PasswordHashingTest.php, line 137 - Contains \Drupal\Tests\Core\Password\PasswordHashingTest.
Class
- PasswordHashingTest
- Unit tests for password hashing API.
Namespace
Drupal\Tests\Core\PasswordCode
public function testLongPassword($password, $allowed) {
$hashed_password = $this->passwordHasher
->hash($password);
if ($allowed) {
$this
->assertNotFalse($hashed_password);
}
else {
$this
->assertFalse($hashed_password);
}
}