We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87ef448 commit 64dd0a6Copy full SHA for 64dd0a6
tests/GeometryCastTest.php
@@ -104,3 +104,13 @@
104
$testPlace->getAttribute('point_with_line_string_cast');
105
})->toThrow(InvalidArgumentException::class);
106
});
107
+
108
+it('creates a model record with geometry from geo json array', function (): void {
109
+ $point = new Point(0, 180);
110
+ $pointGeoJsonArray = $point->toArray();
111
112
+ /** @var TestPlace $testPlace */
113
+ $testPlace = TestPlace::factory()->make(['point' => $pointGeoJsonArray]);
114
115
+ expect($testPlace->point)->toEqual($point);
116
+});
0 commit comments