| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | public function testPasswordHash(): void |
||
| 10 | { |
||
| 11 | $password = new PasswordHasher(PASSWORD_BCRYPT, [ |
||
| 12 | // minimum blowfish's value is enough for tests |
||
| 13 | 'cost' => 4, |
||
| 14 | ]); |
||
| 15 | |||
| 16 | $secret = 'secret'; |
||
| 17 | $hash = $password->hash($secret); |
||
| 18 | $this->assertTrue($password->validate($secret, $hash)); |
||
| 19 | $this->assertFalse($password->validate('test', $hash)); |
||
| 20 | } |
||
| 22 |