| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | public function testMakeAndVerify(){ |
||
| 6 | $the_password = "MyLittleSecret"; |
||
| 7 | |||
| 8 | $hash = Password::make($the_password); |
||
| 9 | $hash_2 = Password::make("Fake!"); |
||
| 10 | |||
| 11 | $this->assertNotEmpty($hash); |
||
| 12 | $this->assertNotEmpty($hash_2); |
||
| 13 | |||
| 14 | $this->assertTrue(Password::verify($the_password,$hash)); |
||
| 15 | $this->assertFalse(Password::verify($the_password,$hash_2)); |
||
| 16 | |||
| 17 | $this->assertTrue(Password::compare($the_password,$the_password)); |
||
| 18 | $this->assertFalse(Password::compare($the_password,"not-the-same")); |
||
| 19 | |||
| 20 | } |
||
| 21 | |||
| 24 |