@@ -154,27 +154,24 @@ public function testGeoSearchQueriesIntersectsAndDisjoint(): void
154
154
155
155
$ ftSearchArguments = new SearchArguments ();
156
156
$ ftSearchArguments ->params (['shape ' , 'POLYGON ((15 15, 75 15, 50 70, 20 40, 15 15)) ' ]);
157
+ $ ftSearchArguments ->noContent ();
157
158
$ ftSearchArguments ->dialect (3 );
158
159
159
160
$ actualResponse = $ redis ->ftsearch ('idx_geo ' , '@g:[intersects $shape] ' , $ ftSearchArguments );
160
- $ this ->assertSame (
161
+ $ this ->assertSameValues (
161
162
[
162
163
2 ,
163
164
'geo:doc_polygon1 ' ,
164
- ['g ' , 'POLYGON ((20 20, 25 35, 35 25, 20 20)) ' ],
165
165
'geo:doc_point2 ' ,
166
- ['g ' , 'POINT (50 50) ' ],
167
166
], $ actualResponse
168
167
);
169
168
170
169
$ actualResponse = $ redis ->ftsearch ('idx_geo ' , '@g:[disjoint $shape] ' , $ ftSearchArguments );
171
- $ this ->assertSame (
170
+ $ this ->assertSameValues (
172
171
[
173
172
2 ,
174
173
'geo:doc_polygon2 ' ,
175
- ['g ' , 'POLYGON ((60 60, 65 75, 70 70, 65 55, 60 60)) ' ],
176
174
'geo:doc_point1 ' ,
177
- ['g ' , 'POINT (10 10) ' ],
178
175
], $ actualResponse
179
176
);
180
177
}
@@ -208,42 +205,41 @@ public function testGeoSearchQueriesContainsAndWithin(): void
208
205
209
206
$ ftSearchArguments = new SearchArguments ();
210
207
$ ftSearchArguments ->params (['shape ' , 'POINT(25 25) ' ]);
208
+ $ ftSearchArguments ->noContent ();
211
209
$ ftSearchArguments ->dialect (3 );
212
210
213
211
$ actualResponse = $ redis ->ftsearch ('idx_geo ' , '@g:[contains $shape] ' , $ ftSearchArguments );
214
- $ this ->assertSame (
212
+ $ this ->assertSameValues (
215
213
[
216
214
1 ,
217
215
'geo:doc_polygon1 ' ,
218
- ['g ' , 'POLYGON ((20 20, 25 35, 35 25, 20 20)) ' ],
219
216
], $ actualResponse
220
217
);
221
218
222
219
$ ftSearchArguments = new SearchArguments ();
223
220
$ ftSearchArguments ->params (['shape ' , 'POLYGON((24 24, 24 26, 25 25, 24 24)) ' ]);
221
+ $ ftSearchArguments ->noContent ();
224
222
$ ftSearchArguments ->dialect (3 );
225
223
226
224
$ actualResponse = $ redis ->ftsearch ('idx_geo ' , '@g:[contains $shape] ' , $ ftSearchArguments );
227
- $ this ->assertSame (
225
+ $ this ->assertSameValues (
228
226
[
229
227
1 ,
230
228
'geo:doc_polygon1 ' ,
231
- ['g ' , 'POLYGON ((20 20, 25 35, 35 25, 20 20)) ' ],
232
229
], $ actualResponse
233
230
);
234
231
235
232
$ ftSearchArguments = new SearchArguments ();
236
233
$ ftSearchArguments ->params (['shape ' , 'POLYGON((15 15, 75 15, 50 70, 20 40, 15 15)) ' ]);
234
+ $ ftSearchArguments ->noContent ();
237
235
$ ftSearchArguments ->dialect (3 );
238
236
239
237
$ actualResponse = $ redis ->ftsearch ('idx_geo ' , '@g:[within $shape] ' , $ ftSearchArguments );
240
- $ this ->assertSame (
238
+ $ this ->assertSameValues (
241
239
[
242
240
2 ,
243
241
'geo:doc_polygon1 ' ,
244
- ['g ' , 'POLYGON ((20 20, 25 35, 35 25, 20 20)) ' ],
245
242
'geo:doc_point2 ' ,
246
- ['g ' , 'POINT (50 50) ' ],
247
243
], $ actualResponse
248
244
);
249
245
}
0 commit comments