Skip to content

Commit

Permalink
Updated unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
grimzy committed Mar 9, 2020
1 parent b9e6f4a commit eb01c85
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
V=5.7
V=8.0
DB_DIR=$(shell pwd)/_db-$(V)
mV=10.3
mDB_DIR=$(shell pwd)/_db-$(mV)
Expand Down
5 changes: 4 additions & 1 deletion tests/Unit/Types/PointTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ public function testFromJson()

public function testInvalidGeoJsonException()
{
$this->assertException(\Grimzy\LaravelMysqlSpatial\Exceptions\InvalidGeoJsonException::class);
$this->assertException(
\Grimzy\LaravelMysqlSpatial\Exceptions\InvalidGeoJsonException::class,
'Expected GeoJson\Geometry\Point, got GeoJson\Geometry\LineString'
);
Point::fromJson('{"type": "LineString","coordinates":[[1,1],[2,2]]}');
}

Expand Down
5 changes: 4 additions & 1 deletion tests/Unit/Types/PolygonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ public function testFromJson()

public function testInvalidGeoJsonException()
{
$this->assertException(\Grimzy\LaravelMysqlSpatial\Exceptions\InvalidGeoJsonException::class);
$this->assertException(
\Grimzy\LaravelMysqlSpatial\Exceptions\InvalidGeoJsonException::class,
'Expected GeoJson\Geometry\Polygon, got GeoJson\Geometry\Point'
);
Polygon::fromJson('{"type":"Point","coordinates":[3.4,1.2]}');
}

Expand Down

0 comments on commit eb01c85

Please sign in to comment.