| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function unauthorized() |
||
| 31 | { |
||
| 32 | $command = new Command(); |
||
| 33 | |||
| 34 | $clear = Mockery::mock(new Clear())->makePartial(); |
||
| 35 | |||
| 36 | $clear->shouldReceive('authorized')->andReturn(false); |
||
| 37 | |||
| 38 | $result = $command->execute($clear); |
||
| 39 | |||
| 40 | $expectedArray = [ |
||
| 41 | [ |
||
| 42 | 'type' => 'error', |
||
| 43 | 'content' => '/clear is an unauthorized command.', |
||
| 44 | ] |
||
| 45 | ]; |
||
| 46 | |||
| 47 | $this->assertNotNull($result['timestamp']); |
||
| 48 | $this->assertEquals($expectedArray, $result['lines']); |
||
| 49 | } |
||
| 50 | } |
||
| 51 |