| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | function it_should_hydrate_response() |
||
| 19 | { |
||
| 20 | $stream = m::mock(StreamInterface::class); |
||
| 21 | $stream->shouldReceive('__toString')->once()->andReturn('{"param": "value","param2": 99}'); |
||
| 22 | |||
| 23 | $response = m::mock(ResponseInterface::class); |
||
| 24 | $response->shouldReceive('getHeaderLine')->with('Content-Type')->andReturn('application/json'); |
||
| 25 | $response->shouldReceive('getBody')->andReturn($stream); |
||
| 26 | |||
| 27 | $hydrated = $this->hydrate($response); |
||
| 28 | $hydrated->shouldBeArray(); |
||
| 29 | } |
||
| 30 | } |
||
| 31 |