Skip to content

Commit eb01c85

Browse files
committed
Updated unit tests
1 parent b9e6f4a commit eb01c85

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
V=5.7
1+
V=8.0
22
DB_DIR=$(shell pwd)/_db-$(V)
33
mV=10.3
44
mDB_DIR=$(shell pwd)/_db-$(mV)

tests/Unit/Types/PointTest.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ public function testFromJson()
6969

7070
public function testInvalidGeoJsonException()
7171
{
72-
$this->assertException(\Grimzy\LaravelMysqlSpatial\Exceptions\InvalidGeoJsonException::class);
72+
$this->assertException(
73+
\Grimzy\LaravelMysqlSpatial\Exceptions\InvalidGeoJsonException::class,
74+
'Expected GeoJson\Geometry\Point, got GeoJson\Geometry\LineString'
75+
);
7376
Point::fromJson('{"type": "LineString","coordinates":[[1,1],[2,2]]}');
7477
}
7578

tests/Unit/Types/PolygonTest.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ public function testFromJson()
5656

5757
public function testInvalidGeoJsonException()
5858
{
59-
$this->assertException(\Grimzy\LaravelMysqlSpatial\Exceptions\InvalidGeoJsonException::class);
59+
$this->assertException(
60+
\Grimzy\LaravelMysqlSpatial\Exceptions\InvalidGeoJsonException::class,
61+
'Expected GeoJson\Geometry\Polygon, got GeoJson\Geometry\Point'
62+
);
6063
Polygon::fromJson('{"type":"Point","coordinates":[3.4,1.2]}');
6164
}
6265

0 commit comments

Comments
 (0)