| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 61 | public function testExecute(): void |
||
| 62 | { |
||
| 63 | $dateTime = '2017-04-15T23:35:00+02:00'; |
||
| 64 | |||
| 65 | $requestMock = \Mockery::mock(Request::class); |
||
|
1 ignored issue
–
show
|
|||
| 66 | $consoleMock = \Mockery::mock(AdapterInterface::class); |
||
| 67 | |||
| 68 | $this->optionsMock->shouldReceive('getLastSync')->andReturn($dateTime); |
||
|
3 ignored issues
–
show
|
|||
| 69 | $this->optionsMock->shouldReceive('setLastSync'); |
||
| 70 | $this->optionsMock->shouldReceive('toArray'); |
||
| 71 | $this->writerMock->shouldReceive('toFile'); |
||
| 72 | |||
| 73 | $this->loggerMock->shouldReceive('info') |
||
| 74 | ->with("Syncing time entries since {$dateTime}") |
||
|
1 ignored issue
–
show
|
|||
| 75 | ->once(); |
||
| 76 | |||
| 77 | $this->loggerMock->shouldReceive('info') |
||
| 78 | ->with('Updated last sync time') |
||
| 79 | ->once(); |
||
| 80 | |||
| 81 | $this->syncServiceMock->shouldReceive('sync')->with($dateTime); |
||
| 82 | |||
| 83 | $this->assertEquals(1, $this->command->execute($requestMock, $consoleMock)); |
||
|
2 ignored issues
–
show
|
|||
| 84 | } |
||
| 111 | } |