function PasswordHashingTest::setUp
Same name in other branches
- 7.x modules/simpletest/tests/password.test \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
Class
- PasswordHashingTest
- Unit tests for password hashing API.
Namespace
Drupal\Tests\Core\PasswordCode
protected function setUp() {
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));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.