protected function PasswordHashingTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php \Drupal\Tests\Core\Password\PasswordHashingTest::setUp()
- 9 core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php \Drupal\Tests\Core\Password\PasswordHashingTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
tests/ Drupal/ Tests/ Core/ Password/ PasswordHashingTest.php, line 60 - Contains \Drupal\Tests\Core\Password\PasswordHashingTest.
Class
- PasswordHashingTest
- Unit tests for password hashing API.
Namespace
Drupal\Tests\Core\PasswordCode
protected function setUp() : void {
parent::setUp();
$this->password = $this
->randomMachineName();
$this->passwordHasher = new PhpassHashedPassword(1);
$this->hashedPassword = $this->passwordHasher
->hash($this->password);
$this->md5HashedPassword = 'U' . $this->passwordHasher
->hash(md5($this->password));
}