| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function testBuildErrorResponseReturnsData(): void |
||
| 23 | { |
||
| 24 | $message = 'some-error'; |
||
| 25 | $code = 666; |
||
| 26 | $uuidValue = 'some-uuid'; |
||
| 27 | $error = new Exception($message, $code); |
||
| 28 | |||
| 29 | $uuid = Mockery::mock(UuidInterface::class); |
||
| 30 | |||
| 31 | $uuid->shouldReceive('toString') |
||
| 32 | ->withNoArgs() |
||
| 33 | ->once() |
||
| 34 | ->andReturn($uuidValue); |
||
| 35 | |||
| 36 | $this->assertSame( |
||
| 37 | [ |
||
| 38 | 'error' => [ |
||
| 39 | 'message' => $message, |
||
| 40 | 'code' => $code, |
||
| 41 | 'id' => $uuidValue |
||
| 42 | ] |
||
| 43 | ], |
||
| 44 | $this->subject->buildErrorResponse($error, $uuid) |
||
|
|
|||
| 45 | ); |
||
| 58 |