@@ -318,7 +318,7 @@ public function testScopeComparison()
318318 $ this ->assertInstanceOf (\Grimzy \LaravelMysqlSpatial \Eloquent \Builder::class, $ query );
319319 $ q = $ query ->getQuery ();
320320 $ this ->assertNotEmpty ($ q ->wheres );
321- $ this ->assertContains ("st_within(`point`, GeomFromText ('POLYGON((1 1,2 1),(2 1,2 2),(2 2,1 1))')) " , $ q ->wheres [0 ]['sql ' ]);
321+ $ this ->assertContains ("st_within(`point`, ST_GeomFromText ('POLYGON((1 1,2 1),(2 1,2 2),(2 2,1 1))')) " , $ q ->wheres [0 ]['sql ' ]);
322322 }
323323
324324 public function testScopeWithin ()
@@ -328,7 +328,7 @@ public function testScopeWithin()
328328 $ this ->assertInstanceOf (\Grimzy \LaravelMysqlSpatial \Eloquent \Builder::class, $ query );
329329 $ q = $ query ->getQuery ();
330330 $ this ->assertNotEmpty ($ q ->wheres );
331- $ this ->assertContains ("st_within(`point`, GeomFromText ('POLYGON((1 1,2 1),(2 1,2 2),(2 2,1 1))')) " , $ q ->wheres [0 ]['sql ' ]);
331+ $ this ->assertContains ("st_within(`point`, ST_GeomFromText ('POLYGON((1 1,2 1),(2 1,2 2),(2 2,1 1))')) " , $ q ->wheres [0 ]['sql ' ]);
332332 }
333333
334334 public function testScopeCrosses ()
@@ -338,7 +338,7 @@ public function testScopeCrosses()
338338 $ this ->assertInstanceOf (\Grimzy \LaravelMysqlSpatial \Eloquent \Builder::class, $ query );
339339 $ q = $ query ->getQuery ();
340340 $ this ->assertNotEmpty ($ q ->wheres );
341- $ this ->assertContains ("st_crosses(`point`, GeomFromText ('POLYGON((1 1,2 1),(2 1,2 2),(2 2,1 1))')) " , $ q ->wheres [0 ]['sql ' ]);
341+ $ this ->assertContains ("st_crosses(`point`, ST_GeomFromText ('POLYGON((1 1,2 1),(2 1,2 2),(2 2,1 1))')) " , $ q ->wheres [0 ]['sql ' ]);
342342 }
343343
344344 public function testScopeContains ()
@@ -348,7 +348,7 @@ public function testScopeContains()
348348 $ this ->assertInstanceOf (\Grimzy \LaravelMysqlSpatial \Eloquent \Builder::class, $ query );
349349 $ q = $ query ->getQuery ();
350350 $ this ->assertNotEmpty ($ q ->wheres );
351- $ this ->assertContains ("st_contains(`point`, GeomFromText ('POLYGON((1 1,2 1),(2 1,2 2),(2 2,1 1))')) " , $ q ->wheres [0 ]['sql ' ]);
351+ $ this ->assertContains ("st_contains(`point`, ST_GeomFromText ('POLYGON((1 1,2 1),(2 1,2 2),(2 2,1 1))')) " , $ q ->wheres [0 ]['sql ' ]);
352352 }
353353
354354 public function testScopeDisjoint ()
@@ -358,7 +358,7 @@ public function testScopeDisjoint()
358358 $ this ->assertInstanceOf (\Grimzy \LaravelMysqlSpatial \Eloquent \Builder::class, $ query );
359359 $ q = $ query ->getQuery ();
360360 $ this ->assertNotEmpty ($ q ->wheres );
361- $ this ->assertContains ("st_disjoint(`point`, GeomFromText ('POLYGON((1 1,2 1),(2 1,2 2),(2 2,1 1))')) " , $ q ->wheres [0 ]['sql ' ]);
361+ $ this ->assertContains ("st_disjoint(`point`, ST_GeomFromText ('POLYGON((1 1,2 1),(2 1,2 2),(2 2,1 1))')) " , $ q ->wheres [0 ]['sql ' ]);
362362 }
363363
364364 public function testScopeEquals ()
@@ -368,7 +368,7 @@ public function testScopeEquals()
368368 $ this ->assertInstanceOf (\Grimzy \LaravelMysqlSpatial \Eloquent \Builder::class, $ query );
369369 $ q = $ query ->getQuery ();
370370 $ this ->assertNotEmpty ($ q ->wheres );
371- $ this ->assertContains ("st_equals(`point`, GeomFromText ('POLYGON((1 1,2 1),(2 1,2 2),(2 2,1 1))')) " , $ q ->wheres [0 ]['sql ' ]);
371+ $ this ->assertContains ("st_equals(`point`, ST_GeomFromText ('POLYGON((1 1,2 1),(2 1,2 2),(2 2,1 1))')) " , $ q ->wheres [0 ]['sql ' ]);
372372 }
373373
374374 public function testScopeIntersects ()
@@ -378,7 +378,7 @@ public function testScopeIntersects()
378378 $ this ->assertInstanceOf (\Grimzy \LaravelMysqlSpatial \Eloquent \Builder::class, $ query );
379379 $ q = $ query ->getQuery ();
380380 $ this ->assertNotEmpty ($ q ->wheres );
381- $ this ->assertContains ("st_intersects(`point`, GeomFromText ('POLYGON((1 1,2 1),(2 1,2 2),(2 2,1 1))')) " , $ q ->wheres [0 ]['sql ' ]);
381+ $ this ->assertContains ("st_intersects(`point`, ST_GeomFromText ('POLYGON((1 1,2 1),(2 1,2 2),(2 2,1 1))')) " , $ q ->wheres [0 ]['sql ' ]);
382382 }
383383
384384 public function testScopeOverlaps ()
@@ -388,7 +388,7 @@ public function testScopeOverlaps()
388388 $ this ->assertInstanceOf (\Grimzy \LaravelMysqlSpatial \Eloquent \Builder::class, $ query );
389389 $ q = $ query ->getQuery ();
390390 $ this ->assertNotEmpty ($ q ->wheres );
391- $ this ->assertContains ("st_overlaps(`point`, GeomFromText ('POLYGON((1 1,2 1),(2 1,2 2),(2 2,1 1))')) " , $ q ->wheres [0 ]['sql ' ]);
391+ $ this ->assertContains ("st_overlaps(`point`, ST_GeomFromText ('POLYGON((1 1,2 1),(2 1,2 2),(2 2,1 1))')) " , $ q ->wheres [0 ]['sql ' ]);
392392 }
393393
394394 public function testScopeDoesTouch ()
@@ -398,7 +398,7 @@ public function testScopeDoesTouch()
398398 $ this ->assertInstanceOf (\Grimzy \LaravelMysqlSpatial \Eloquent \Builder::class, $ query );
399399 $ q = $ query ->getQuery ();
400400 $ this ->assertNotEmpty ($ q ->wheres );
401- $ this ->assertContains ("st_touches(`point`, GeomFromText ('POLYGON((1 1,2 1),(2 1,2 2),(2 2,1 1))')) " , $ q ->wheres [0 ]['sql ' ]);
401+ $ this ->assertContains ("st_touches(`point`, ST_GeomFromText ('POLYGON((1 1,2 1),(2 1,2 2),(2 2,1 1))')) " , $ q ->wheres [0 ]['sql ' ]);
402402 }
403403}
404404
0 commit comments