@@ -37,15 +37,15 @@ public function testInsertUpdatePointHasCorrectSql()
3737 $ this ->model ->save ();
3838
3939 $ this ->assertStringStartsWith ('insert ' , $ this ->queries [0 ]);
40- $ this ->assertContains ('insert into `test_models` (`point`) values (ST_GeomFromText(?)) ' , $ this ->queries [0 ]);
40+ $ this ->assertContains ('insert into `test_models` (`point`) values (ST_GeomFromText(?, ? )) ' , $ this ->queries [0 ]);
4141 // TODO: assert bindings in query
4242 $ this ->assertTrue ($ this ->model ->exists );
4343
4444 $ this ->model ->point = new Point (1 , 2 );
4545 $ this ->model ->save ();
4646
4747 $ this ->assertStringStartsWith ('update ' , $ this ->queries [1 ]);
48- $ this ->assertContains ('update `test_models` set `point` = ST_GeomFromText(?) where `id` = ? ' , $ this ->queries [1 ]);
48+ $ this ->assertContains ('update `test_models` set `point` = ST_GeomFromText(?, ? ) where `id` = ? ' , $ this ->queries [1 ]);
4949 // TODO: assert bindings in query
5050 }
5151
@@ -60,15 +60,15 @@ public function testInsertUpdateLineStringHasCorrectSql()
6060 $ this ->model ->save ();
6161
6262 $ this ->assertStringStartsWith ('insert ' , $ this ->queries [0 ]);
63- $ this ->assertContains ('insert into `test_models` (`linestring`) values (ST_GeomFromText(?)) ' , $ this ->queries [0 ]);
63+ $ this ->assertContains ('insert into `test_models` (`linestring`) values (ST_GeomFromText(?, ? )) ' , $ this ->queries [0 ]);
6464 // TODO: assert bindings in query
6565 $ this ->assertTrue ($ this ->model ->exists );
6666
6767 $ this ->model ->linestring = new \Grimzy \LaravelMysqlSpatial \Types \LineString ([$ point1 , $ point2 ]);
6868 $ this ->model ->save ();
6969
7070 $ this ->assertStringStartsWith ('update ' , $ this ->queries [1 ]);
71- $ this ->assertContains ('update `test_models` set `linestring` = ST_GeomFromText(?) where `id` = ? ' , $ this ->queries [1 ]);
71+ $ this ->assertContains ('update `test_models` set `linestring` = ST_GeomFromText(?, ? ) where `id` = ? ' , $ this ->queries [1 ]);
7272 // TODO: assert bindings in query
7373 }
7474
@@ -87,14 +87,14 @@ public function testInsertUpdatePolygonHasCorrectSql()
8787 $ this ->model ->save ();
8888
8989 $ this ->assertStringStartsWith ('insert ' , $ this ->queries [0 ]);
90- $ this ->assertContains ('insert into `test_models` (`polygon`) values (ST_GeomFromText(?)) ' , $ this ->queries [0 ]);
90+ $ this ->assertContains ('insert into `test_models` (`polygon`) values (ST_GeomFromText(?, ? )) ' , $ this ->queries [0 ]);
9191 // TODO: assert bindings in query
9292 $ this ->assertTrue ($ this ->model ->exists );
9393
9494 $ this ->model ->polygon = new \Grimzy \LaravelMysqlSpatial \Types \Polygon ([$ linestring1 , $ linestring2 ]);
9595 $ this ->model ->save ();
9696 $ this ->assertStringStartsWith ('update ' , $ this ->queries [1 ]);
97- $ this ->assertContains ('update `test_models` set `polygon` = ST_GeomFromText(?) where `id` = ? ' , $ this ->queries [1 ]);
97+ $ this ->assertContains ('update `test_models` set `polygon` = ST_GeomFromText(?, ? ) where `id` = ? ' , $ this ->queries [1 ]);
9898 // TODO: assert bindings in query
9999 }
100100
@@ -109,15 +109,15 @@ public function testInsertUpdateMultiPointHasCorrectSql()
109109 $ this ->model ->save ();
110110
111111 $ this ->assertStringStartsWith ('insert ' , $ this ->queries [0 ]);
112- $ this ->assertContains ('insert into `test_models` (`multipoint`) values (ST_GeomFromText(?)) ' , $ this ->queries [0 ]);
112+ $ this ->assertContains ('insert into `test_models` (`multipoint`) values (ST_GeomFromText(?, ? )) ' , $ this ->queries [0 ]);
113113 // TODO: assert bindings in query
114114 $ this ->assertTrue ($ this ->model ->exists );
115115
116116 $ this ->model ->multipoint = new \Grimzy \LaravelMysqlSpatial \Types \MultiPoint ([$ point1 , $ point2 ]);
117117 $ this ->model ->save ();
118118
119119 $ this ->assertStringStartsWith ('update ' , $ this ->queries [1 ]);
120- $ this ->assertContains ('update `test_models` set `multipoint` = ST_GeomFromText(?) where `id` = ? ' , $ this ->queries [1 ]);
120+ $ this ->assertContains ('update `test_models` set `multipoint` = ST_GeomFromText(?, ? ) where `id` = ? ' , $ this ->queries [1 ]);
121121 // TODO: assert bindings in query
122122 }
123123
@@ -136,14 +136,14 @@ public function testInsertUpdateMultiLineStringHasCorrectSql()
136136 $ this ->model ->save ();
137137
138138 $ this ->assertStringStartsWith ('insert ' , $ this ->queries [0 ]);
139- $ this ->assertContains ('insert into `test_models` (`multilinestring`) values (ST_GeomFromText(?)) ' , $ this ->queries [0 ]);
139+ $ this ->assertContains ('insert into `test_models` (`multilinestring`) values (ST_GeomFromText(?, ? )) ' , $ this ->queries [0 ]);
140140 // TODO: assert bindings in query
141141 $ this ->assertTrue ($ this ->model ->exists );
142142
143143 $ this ->model ->multilinestring = new \Grimzy \LaravelMysqlSpatial \Types \MultiLineString ([$ linestring1 , $ linestring2 ]);
144144 $ this ->model ->save ();
145145 $ this ->assertStringStartsWith ('update ' , $ this ->queries [1 ]);
146- $ this ->assertContains ('update `test_models` set `multilinestring` = ST_GeomFromText(?) where `id` = ? ' , $ this ->queries [1 ]);
146+ $ this ->assertContains ('update `test_models` set `multilinestring` = ST_GeomFromText(?, ? ) where `id` = ? ' , $ this ->queries [1 ]);
147147 // TODO: assert bindings in query
148148 }
149149
@@ -171,14 +171,14 @@ public function testInsertUpdateMultiPolygonHasCorrectSql()
171171 $ this ->model ->save ();
172172
173173 $ this ->assertStringStartsWith ('insert ' , $ this ->queries [0 ]);
174- $ this ->assertContains ('insert into `test_models` (`multipolygon`) values (ST_GeomFromText(?)) ' , $ this ->queries [0 ]);
174+ $ this ->assertContains ('insert into `test_models` (`multipolygon`) values (ST_GeomFromText(?, ? )) ' , $ this ->queries [0 ]);
175175 // TODO: assert bindings in query
176176 $ this ->assertTrue ($ this ->model ->exists );
177177
178178 $ this ->model ->multipolygon = new \Grimzy \LaravelMysqlSpatial \Types \MultiPolygon ([$ polygon1 , $ polygon2 ]);
179179 $ this ->model ->save ();
180180 $ this ->assertStringStartsWith ('update ' , $ this ->queries [1 ]);
181- $ this ->assertContains ('update `test_models` set `multipolygon` = ST_GeomFromText(?) where `id` = ? ' , $ this ->queries [1 ]);
181+ $ this ->assertContains ('update `test_models` set `multipolygon` = ST_GeomFromText(?, ? ) where `id` = ? ' , $ this ->queries [1 ]);
182182 // TODO: assert bindings in query
183183 }
184184
@@ -195,14 +195,14 @@ public function testInsertUpdateGeometryCollectionHasCorrectSql()
195195 $ this ->model ->save ();
196196
197197 $ this ->assertStringStartsWith ('insert ' , $ this ->queries [0 ]);
198- $ this ->assertContains ('insert into `test_models` (`geometrycollection`) values (ST_GeomFromText(?)) ' , $ this ->queries [0 ]);
198+ $ this ->assertContains ('insert into `test_models` (`geometrycollection`) values (ST_GeomFromText(?, ? )) ' , $ this ->queries [0 ]);
199199 // TODO: assert bindings in query
200200 $ this ->assertTrue ($ this ->model ->exists );
201201
202202 $ this ->model ->geometrycollection = new \Grimzy \LaravelMysqlSpatial \Types \GeometryCollection ([$ point1 , $ linestring1 ]);
203203 $ this ->model ->save ();
204204 $ this ->assertStringStartsWith ('update ' , $ this ->queries [1 ]);
205- $ this ->assertContains ('update `test_models` set `geometrycollection` = ST_GeomFromText(?) where `id` = ? ' , $ this ->queries [1 ]);
205+ $ this ->assertContains ('update `test_models` set `geometrycollection` = ST_GeomFromText(?, ? ) where `id` = ? ' , $ this ->queries [1 ]);
206206 // TODO: assert bindings in query
207207 }
208208
0 commit comments