Total Complexity | 3 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | class ProcessorResponseTest extends TestCase |
||
13 | { |
||
14 | public function testCanBeConstructed() |
||
15 | { |
||
16 | $requestMock = $this->createMock(Request::class); |
||
17 | $processorResponse = new ProcessorResponse($requestMock, []); |
||
18 | |||
19 | $this->assertInstanceOf(ProcessorResponse::class, $processorResponse); |
||
20 | } |
||
21 | |||
22 | public function testRequestReadyToSetAsHttp() |
||
23 | { |
||
24 | $request = new Request(); |
||
25 | $request->attributes->set('_format', 'json'); |
||
26 | $processorResponse = new ProcessorResponse($request, ['response_data'=>'data'], true); |
||
27 | |||
28 | $this->assertInstanceOf(Response::class, $response = $processorResponse->toHttpResponse()); |
||
29 | } |
||
30 | |||
31 | public function testRequestNotReadyToSetAsHttp() |
||
39 | } |
||
40 | } |