| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function testCreateHalCollection() |
||
| 22 | { |
||
| 23 | $json = json_decode(file_get_contents(__DIR__ . '/../../data/orderList.hal.json'), true); |
||
| 24 | |||
| 25 | $this |
||
| 26 | ->given($collection = $this->newTestedInstance($json['_embedded']['ea:order'], $json)) |
||
| 27 | |||
| 28 | ->then |
||
| 29 | ->object($collection) |
||
| 30 | ->isInstanceOf('Mapado\RestClientSdk\Collection\HalCollection') |
||
| 31 | ->hasSize(2) |
||
| 32 | |||
| 33 | ->and |
||
| 34 | ->array($collection->getLinks()) |
||
| 35 | ->size->isEqualTo(5) |
||
| 36 | |||
| 37 | ->and |
||
| 38 | ->string($collection->getLinks()['self']['href']) |
||
| 39 | ->isEqualTo('/orders') |
||
| 40 | ; |
||
| 43 |