| Total Complexity | 3 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 16 | class HydrableObjectCollectionTest extends TestCase |
||
| 17 | { |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @return void |
||
| 21 | */ |
||
| 22 | public function testContracts() : void |
||
| 23 | { |
||
| 24 | $collection = new HydrableObjectCollection(); |
||
| 25 | |||
| 26 | $this->assertInstanceOf(HydrableObjectCollectionInterface::class, $collection); |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @return void |
||
| 31 | */ |
||
| 32 | public function testAdd() : void |
||
| 33 | { |
||
| 34 | $store = [ |
||
| 35 | new Fixture\BarDto(), |
||
| 36 | new Fixture\BarDto(), |
||
| 37 | new Fixture\BarDto(), |
||
| 38 | ]; |
||
| 39 | |||
| 40 | $collection = new HydrableObjectCollection(); |
||
| 41 | |||
| 42 | $collection->add($store[0]); |
||
| 43 | $collection->add($store[1]); |
||
| 44 | $collection->add($store[2]); |
||
| 45 | |||
| 46 | $this->assertSame($store, $collection->getIterator()->getArrayCopy()); |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return void |
||
| 51 | */ |
||
| 52 | public function testUnexpectedObject() : void |
||
| 61 | } |
||
| 62 | } |
||
| 63 |