| Conditions | 1 |
| Paths | 1 |
| Total Lines | 24 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function it_finds_key() |
||
| 36 | { |
||
| 37 | $this->storage |
||
| 38 | ->expects($this->once()) |
||
| 39 | ->method('get') |
||
| 40 | ->with('XYZ') |
||
| 41 | ->willReturn(new Key('XYZ', 'john.doe', 60)) |
||
| 42 | ; |
||
| 43 | |||
| 44 | $code = $this->tester->execute(['command' => 'damax:api-auth:storage:lookup-key', 'key' => 'XYZ']); |
||
| 45 | |||
| 46 | $output = <<<CONSOLE |
||
| 47 | |||
| 48 | ---------- ---------- |
||
| 49 | Key XYZ |
||
| 50 | Identity john.doe |
||
| 51 | TTL 60 |
||
| 52 | ---------- ---------- |
||
| 53 | |||
| 54 | |||
| 55 | CONSOLE; |
||
| 56 | |||
| 57 | $this->assertSame(0, $code); |
||
| 58 | $this->assertEquals($output, $this->tester->getDisplay()); |
||
| 59 | } |
||
| 79 |