diff --git a/tests/Models/AddressMapperTest.php b/tests/Models/AddressMapperTest.php index a5e457ee..1317eb60 100755 --- a/tests/Models/AddressMapperTest.php +++ b/tests/Models/AddressMapperTest.php @@ -41,7 +41,8 @@ public function testCR() : void $address->address = 'Some address here'; $address->state = 'This is a state 123'; $address->setCountry('DE'); - $address->setGeo(['lat' => 12.1, 'long' => 11.2,]); + $address->lat = 12.1; + $address->lon = 11.2; $id = AddressMapper::create()->execute($address); self::assertGreaterThan(0, $address->id); diff --git a/tests/Models/AddressTest.php b/tests/Models/AddressTest.php index 228d96cb..67d8da48 100755 --- a/tests/Models/AddressTest.php +++ b/tests/Models/AddressTest.php @@ -84,7 +84,8 @@ public function testToArray() : void $this->address->address = 'Some address here'; $this->address->state = 'This is a state 123'; $this->address->setCountry('Country'); - $this->address->setGeo(['lat' => 12.1, 'long' => 11.2,]); + $this->address->lat = 12.1; + $this->address->lon = 11.2; self::assertEquals($expected, $this->address->toArray()); } @@ -113,7 +114,8 @@ public function testJsonSerialize() : void $this->address->address = 'Some address here'; $this->address->state = 'This is a state 123'; $this->address->setCountry('Country'); - $this->address->setGeo(['lat' => 12.1, 'long' => 11.2,]); + $this->address->lat = 12.1; + $this->address->lon = 11.2; self::assertEquals($expected, $this->address->jsonSerialize()); self::assertEquals(\json_encode($this->address->jsonSerialize()), $this->address->serialize()); @@ -122,17 +124,15 @@ public function testJsonSerialize() : void public function testUnserialize() : void { $expected = [ - 'postal' => '0123456789', - 'city' => 'city', - 'country' => 'Country', - 'address' => 'Some address here', - 'state' => 'This is a state 123', - 'geo' => [ - 'lat' => 12.1, - 'long' => 11.2, - ], - 'name' => 'name', - 'addition' => 'addition', + 'postal' => '0123456789', + 'city' => 'city', + 'country' => 'Country', + 'address' => 'Some address here', + 'state' => 'This is a state 123', + 'lat' => 12.1, + 'lon' => 11.2, + 'name' => 'name', + 'addition' => 'addition', ]; $this->address->unserialize(\json_encode($expected));