@@ -318,7 +318,7 @@ public function testScopeComparison()
318
318
$ this ->assertInstanceOf (\Grimzy \LaravelMysqlSpatial \Eloquent \Builder::class, $ query );
319
319
$ q = $ query ->getQuery ();
320
320
$ 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 ' ]);
322
322
}
323
323
324
324
public function testScopeWithin ()
@@ -328,7 +328,7 @@ public function testScopeWithin()
328
328
$ this ->assertInstanceOf (\Grimzy \LaravelMysqlSpatial \Eloquent \Builder::class, $ query );
329
329
$ q = $ query ->getQuery ();
330
330
$ 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 ' ]);
332
332
}
333
333
334
334
public function testScopeCrosses ()
@@ -338,7 +338,7 @@ public function testScopeCrosses()
338
338
$ this ->assertInstanceOf (\Grimzy \LaravelMysqlSpatial \Eloquent \Builder::class, $ query );
339
339
$ q = $ query ->getQuery ();
340
340
$ 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 ' ]);
342
342
}
343
343
344
344
public function testScopeContains ()
@@ -348,7 +348,7 @@ public function testScopeContains()
348
348
$ this ->assertInstanceOf (\Grimzy \LaravelMysqlSpatial \Eloquent \Builder::class, $ query );
349
349
$ q = $ query ->getQuery ();
350
350
$ 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 ' ]);
352
352
}
353
353
354
354
public function testScopeDisjoint ()
@@ -358,7 +358,7 @@ public function testScopeDisjoint()
358
358
$ this ->assertInstanceOf (\Grimzy \LaravelMysqlSpatial \Eloquent \Builder::class, $ query );
359
359
$ q = $ query ->getQuery ();
360
360
$ 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 ' ]);
362
362
}
363
363
364
364
public function testScopeEquals ()
@@ -368,7 +368,7 @@ public function testScopeEquals()
368
368
$ this ->assertInstanceOf (\Grimzy \LaravelMysqlSpatial \Eloquent \Builder::class, $ query );
369
369
$ q = $ query ->getQuery ();
370
370
$ 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 ' ]);
372
372
}
373
373
374
374
public function testScopeIntersects ()
@@ -378,7 +378,7 @@ public function testScopeIntersects()
378
378
$ this ->assertInstanceOf (\Grimzy \LaravelMysqlSpatial \Eloquent \Builder::class, $ query );
379
379
$ q = $ query ->getQuery ();
380
380
$ 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 ' ]);
382
382
}
383
383
384
384
public function testScopeOverlaps ()
@@ -388,7 +388,7 @@ public function testScopeOverlaps()
388
388
$ this ->assertInstanceOf (\Grimzy \LaravelMysqlSpatial \Eloquent \Builder::class, $ query );
389
389
$ q = $ query ->getQuery ();
390
390
$ 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 ' ]);
392
392
}
393
393
394
394
public function testScopeDoesTouch ()
@@ -398,7 +398,7 @@ public function testScopeDoesTouch()
398
398
$ this ->assertInstanceOf (\Grimzy \LaravelMysqlSpatial \Eloquent \Builder::class, $ query );
399
399
$ q = $ query ->getQuery ();
400
400
$ 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 ' ]);
402
402
}
403
403
}
404
404
0 commit comments