| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 39 | public function testVerify() |
||
| 40 | { |
||
| 41 | $value = 'value'; |
||
| 42 | $signature = 'signature'; |
||
| 43 | |||
| 44 | $badValue = 'bad_value'; |
||
| 45 | $badSignature = 'bad_signature'; |
||
| 46 | |||
| 47 | $this->algorithm->expects($this->exactly(2)) |
||
| 48 | ->method('compute') |
||
| 49 | ->will($this->returnValueMap([ |
||
| 50 | [$value, $signature], |
||
| 51 | [$badValue, 'wontverify'], |
||
| 52 | ])); |
||
| 53 | |||
| 54 | $this->assertTrue($this->encryption->verify($value, $signature)); |
||
| 55 | $this->assertFalse($this->encryption->verify($badValue, $badSignature)); |
||
| 56 | } |
||
| 57 | } |
||
| 58 |