| Conditions | 2 |
| Paths | 2 |
| Total Lines | 20 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 15 | public function itCanSetAndGetAllTheThings() |
||
| 16 | { |
||
| 17 | $expected = [ |
||
| 18 | AddressEmbeddableInterface::EMBEDDED_PROP_HOUSE_NUMBER => '1', |
||
| 19 | AddressEmbeddableInterface::EMBEDDED_PROP_HOUSE_NAME => 'home', |
||
| 20 | AddressEmbeddableInterface::EMBEDDED_PROP_STREET => 'streety street', |
||
| 21 | AddressEmbeddableInterface::EMBEDDED_PROP_CITY => 'Bradford', |
||
| 22 | AddressEmbeddableInterface::EMBEDDED_PROP_POSTAL_AREA => 'Shipley', |
||
| 23 | AddressEmbeddableInterface::EMBEDDED_PROP_POSTAL_CODE => 'BD17 7DB', |
||
| 24 | AddressEmbeddableInterface::EMBEDDED_PROP_COUNTRY_CODE => 'GBR', |
||
| 25 | ]; |
||
| 26 | $actual = []; |
||
| 27 | $address = new AddressEmbeddable(); |
||
| 28 | foreach ($expected as $property => $value) { |
||
| 29 | $setter = "set$property"; |
||
| 30 | $getter = "get$property"; |
||
| 31 | $address->$setter($value); |
||
| 32 | $actual[$property] = $address->$getter(); |
||
| 33 | } |
||
| 34 | $this->assertSame($expected, $actual); |
||
| 35 | } |
||
| 37 |