@@ -37,15 +37,15 @@ public function testInsertUpdatePointHasCorrectSql()
37
37
$ this ->model ->save ();
38
38
39
39
$ 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 ]);
41
41
// TODO: assert bindings in query
42
42
$ this ->assertTrue ($ this ->model ->exists );
43
43
44
44
$ this ->model ->point = new Point (1 , 2 );
45
45
$ this ->model ->save ();
46
46
47
47
$ 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 ]);
49
49
// TODO: assert bindings in query
50
50
}
51
51
@@ -60,15 +60,15 @@ public function testInsertUpdateLineStringHasCorrectSql()
60
60
$ this ->model ->save ();
61
61
62
62
$ 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 ]);
64
64
// TODO: assert bindings in query
65
65
$ this ->assertTrue ($ this ->model ->exists );
66
66
67
67
$ this ->model ->linestring = new \Grimzy \LaravelMysqlSpatial \Types \LineString ([$ point1 , $ point2 ]);
68
68
$ this ->model ->save ();
69
69
70
70
$ 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 ]);
72
72
// TODO: assert bindings in query
73
73
}
74
74
@@ -87,14 +87,14 @@ public function testInsertUpdatePolygonHasCorrectSql()
87
87
$ this ->model ->save ();
88
88
89
89
$ 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 ]);
91
91
// TODO: assert bindings in query
92
92
$ this ->assertTrue ($ this ->model ->exists );
93
93
94
94
$ this ->model ->polygon = new \Grimzy \LaravelMysqlSpatial \Types \Polygon ([$ linestring1 , $ linestring2 ]);
95
95
$ this ->model ->save ();
96
96
$ 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 ]);
98
98
// TODO: assert bindings in query
99
99
}
100
100
@@ -109,15 +109,15 @@ public function testInsertUpdateMultiPointHasCorrectSql()
109
109
$ this ->model ->save ();
110
110
111
111
$ 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 ]);
113
113
// TODO: assert bindings in query
114
114
$ this ->assertTrue ($ this ->model ->exists );
115
115
116
116
$ this ->model ->multipoint = new \Grimzy \LaravelMysqlSpatial \Types \MultiPoint ([$ point1 , $ point2 ]);
117
117
$ this ->model ->save ();
118
118
119
119
$ 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 ]);
121
121
// TODO: assert bindings in query
122
122
}
123
123
@@ -136,14 +136,14 @@ public function testInsertUpdateMultiLineStringHasCorrectSql()
136
136
$ this ->model ->save ();
137
137
138
138
$ 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 ]);
140
140
// TODO: assert bindings in query
141
141
$ this ->assertTrue ($ this ->model ->exists );
142
142
143
143
$ this ->model ->multilinestring = new \Grimzy \LaravelMysqlSpatial \Types \MultiLineString ([$ linestring1 , $ linestring2 ]);
144
144
$ this ->model ->save ();
145
145
$ 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 ]);
147
147
// TODO: assert bindings in query
148
148
}
149
149
@@ -171,14 +171,14 @@ public function testInsertUpdateMultiPolygonHasCorrectSql()
171
171
$ this ->model ->save ();
172
172
173
173
$ 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 ]);
175
175
// TODO: assert bindings in query
176
176
$ this ->assertTrue ($ this ->model ->exists );
177
177
178
178
$ this ->model ->multipolygon = new \Grimzy \LaravelMysqlSpatial \Types \MultiPolygon ([$ polygon1 , $ polygon2 ]);
179
179
$ this ->model ->save ();
180
180
$ 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 ]);
182
182
// TODO: assert bindings in query
183
183
}
184
184
@@ -195,14 +195,14 @@ public function testInsertUpdateGeometryCollectionHasCorrectSql()
195
195
$ this ->model ->save ();
196
196
197
197
$ 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 ]);
199
199
// TODO: assert bindings in query
200
200
$ this ->assertTrue ($ this ->model ->exists );
201
201
202
202
$ this ->model ->geometrycollection = new \Grimzy \LaravelMysqlSpatial \Types \GeometryCollection ([$ point1 , $ linestring1 ]);
203
203
$ this ->model ->save ();
204
204
$ 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 ]);
206
206
// TODO: assert bindings in query
207
207
}
208
208
0 commit comments