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