Skip to content

Commit 64dd0a6

Browse files
author
Matan Yadaev
committed
fix coverage
1 parent 87ef448 commit 64dd0a6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/GeometryCastTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,13 @@
104104
$testPlace->getAttribute('point_with_line_string_cast');
105105
})->toThrow(InvalidArgumentException::class);
106106
});
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

Comments
 (0)