@@ -14,7 +14,7 @@ public function testCreationWithSoftDelete()
14
14
{
15
15
$ builder = new FilterBuilder ($ this ->mockModel (), null , true );
16
16
17
- $ this ->assertEquals (
17
+ $ this ->assertSame (
18
18
[
19
19
'must ' => [
20
20
[
@@ -33,7 +33,7 @@ public function testCreationWithoutSoftDelete()
33
33
{
34
34
$ builder = new FilterBuilder ($ this ->mockModel (), null , false );
35
35
36
- $ this ->assertEquals (
36
+ $ this ->assertSame (
37
37
[
38
38
'must ' => [],
39
39
'must_not ' => [],
@@ -48,7 +48,7 @@ public function testWhereEq()
48
48
->where ('foo ' , 0 )
49
49
->where ('bar ' , '= ' , 1 );
50
50
51
- $ this ->assertEquals (
51
+ $ this ->assertSame (
52
52
[
53
53
'must ' => [
54
54
['term ' => ['foo ' => 0 ]],
@@ -65,7 +65,7 @@ public function testWhereNotEq()
65
65
$ builder = (new FilterBuilder ($ this ->mockModel ()))
66
66
->where ('foo ' , '!= ' , 'bar ' );
67
67
68
- $ this ->assertEquals (
68
+ $ this ->assertSame (
69
69
[
70
70
'must ' => [],
71
71
'must_not ' => [
@@ -81,7 +81,7 @@ public function testWhereGt()
81
81
$ builder = (new FilterBuilder ($ this ->mockModel ()))
82
82
->where ('foo ' , '> ' , 0 );
83
83
84
- $ this ->assertEquals (
84
+ $ this ->assertSame (
85
85
[
86
86
'must ' => [
87
87
['range ' => ['foo ' => ['gt ' => 0 ]]],
@@ -97,7 +97,7 @@ public function testWhereGte()
97
97
$ builder = (new FilterBuilder ($ this ->mockModel ()))
98
98
->where ('foo ' , '>= ' , 0 );
99
99
100
- $ this ->assertEquals (
100
+ $ this ->assertSame (
101
101
[
102
102
'must ' => [
103
103
['range ' => ['foo ' => ['gte ' => 0 ]]],
@@ -113,7 +113,7 @@ public function testWhereLt()
113
113
$ builder = (new FilterBuilder ($ this ->mockModel ()))
114
114
->where ('foo ' , '< ' , 0 );
115
115
116
- $ this ->assertEquals (
116
+ $ this ->assertSame (
117
117
[
118
118
'must ' => [
119
119
['range ' => ['foo ' => ['lt ' => 0 ]]],
@@ -129,7 +129,7 @@ public function testWhereLte()
129
129
$ builder = (new FilterBuilder ($ this ->mockModel ()))
130
130
->where ('foo ' , '>= ' , 0 );
131
131
132
- $ this ->assertEquals (
132
+ $ this ->assertSame (
133
133
[
134
134
'must ' => [
135
135
['range ' => ['foo ' => ['gte ' => 0 ]]],
@@ -145,7 +145,7 @@ public function testWhereIn()
145
145
$ builder = (new FilterBuilder ($ this ->mockModel ()))
146
146
->whereIn ('foo ' , [0 , 1 ]);
147
147
148
- $ this ->assertEquals (
148
+ $ this ->assertSame (
149
149
[
150
150
'must ' => [
151
151
['terms ' => ['foo ' => [0 , 1 ]]],
@@ -161,7 +161,7 @@ public function testWhereNotIn()
161
161
$ builder = (new FilterBuilder ($ this ->mockModel ()))
162
162
->whereNotIn ('foo ' , [0 , 1 ]);
163
163
164
- $ this ->assertEquals (
164
+ $ this ->assertSame (
165
165
[
166
166
'must ' => [],
167
167
'must_not ' => [
@@ -177,7 +177,7 @@ public function testWhereBetween()
177
177
$ builder = (new FilterBuilder ($ this ->mockModel ()))
178
178
->whereBetween ('foo ' , [0 , 10 ]);
179
179
180
- $ this ->assertEquals (
180
+ $ this ->assertSame (
181
181
[
182
182
'must ' => [
183
183
['range ' => ['foo ' => ['gte ' => 0 , 'lte ' => 10 ]]],
@@ -193,7 +193,7 @@ public function testWhereNotBetween()
193
193
$ builder = (new FilterBuilder ($ this ->mockModel ()))
194
194
->whereNotBetween ('foo ' , [0 , 10 ]);
195
195
196
- $ this ->assertEquals (
196
+ $ this ->assertSame (
197
197
[
198
198
'must ' => [],
199
199
'must_not ' => [
@@ -209,7 +209,7 @@ public function testWhereExists()
209
209
$ builder = (new FilterBuilder ($ this ->mockModel ()))
210
210
->whereExists ('foo ' );
211
211
212
- $ this ->assertEquals (
212
+ $ this ->assertSame (
213
213
[
214
214
'must ' => [
215
215
['exists ' => ['field ' => 'foo ' ]],
@@ -225,7 +225,7 @@ public function testWhereNotExists()
225
225
$ builder = (new FilterBuilder ($ this ->mockModel ()))
226
226
->whereNotExists ('foo ' );
227
227
228
- $ this ->assertEquals (
228
+ $ this ->assertSame (
229
229
[
230
230
'must ' => [],
231
231
'must_not ' => [
@@ -242,7 +242,7 @@ public function testWhereRegexp()
242
242
->whereRegexp ('foo ' , '.* ' )
243
243
->whereRegexp ('bar ' , '^test.* ' , 'EMPTY|NONE ' );
244
244
245
- $ this ->assertEquals (
245
+ $ this ->assertSame (
246
246
[
247
247
'must ' => [
248
248
['regexp ' => ['foo ' => ['value ' => '.* ' , 'flags ' => 'ALL ' ]]],
@@ -279,7 +279,7 @@ function (FilterBuilder $builder) {
279
279
}
280
280
);
281
281
282
- $ this ->assertEquals (
282
+ $ this ->assertSame (
283
283
[
284
284
'must ' => [
285
285
['term ' => ['case2 ' => 2 ]],
@@ -296,7 +296,7 @@ public function testWhereGeoDistance()
296
296
$ builder = (new FilterBuilder ($ this ->mockModel ()))
297
297
->whereGeoDistance ('foo ' , [-20 , 30 ], '10m ' );
298
298
299
- $ this ->assertEquals (
299
+ $ this ->assertSame (
300
300
[
301
301
'must ' => [
302
302
['geo_distance ' => ['distance ' => '10m ' , 'foo ' => [-20 , 30 ]]],
@@ -312,7 +312,7 @@ public function testWhereGeoBoundingBox()
312
312
$ builder = (new FilterBuilder ($ this ->mockModel ()))
313
313
->whereGeoBoundingBox ('foo ' , ['top_left ' => [-5 , 10 ], 'bottom_right ' => [-20 , 30 ]]);
314
314
315
- $ this ->assertEquals (
315
+ $ this ->assertSame (
316
316
[
317
317
'must ' => [
318
318
['geo_bounding_box ' => ['foo ' => ['top_left ' => [-5 , 10 ], 'bottom_right ' => [-20 , 30 ]]]],
@@ -328,7 +328,7 @@ public function testWhereGeoPolygon()
328
328
$ builder = (new FilterBuilder ($ this ->mockModel ()))
329
329
->whereGeoPolygon ('foo ' , [[-70 , 40 ], [-80 , 30 ], [-90 , 20 ]]);
330
330
331
- $ this ->assertEquals (
331
+ $ this ->assertSame (
332
332
[
333
333
'must ' => [
334
334
['geo_polygon ' => ['foo ' => ['points ' => [[-70 , 40 ], [-80 , 30 ], [-90 , 20 ]]]]],
@@ -355,7 +355,7 @@ public function testWhereGeoShape()
355
355
$ builder = (new FilterBuilder ($ this ->mockModel ()))
356
356
->whereGeoShape ('foo ' , $ shape , $ relation );
357
357
358
- $ this ->assertEquals (
358
+ $ this ->assertSame (
359
359
[
360
360
'must ' => [
361
361
[
@@ -379,7 +379,7 @@ public function testOrderBy()
379
379
->orderBy ('foo ' )
380
380
->orderBy ('bar ' , 'DESC ' );
381
381
382
- $ this ->assertEquals (
382
+ $ this ->assertSame (
383
383
[
384
384
['foo ' => 'asc ' ],
385
385
['bar ' => 'desc ' ],
@@ -393,7 +393,7 @@ public function testWith()
393
393
$ builder = (new FilterBuilder ($ this ->mockModel ()))
394
394
->with ('RelatedModel ' );
395
395
396
- $ this ->assertEquals (
396
+ $ this ->assertSame (
397
397
'RelatedModel ' ,
398
398
$ builder ->with
399
399
);
@@ -403,14 +403,13 @@ public function testFrom()
403
403
{
404
404
$ builder = new FilterBuilder ($ this ->mockModel ());
405
405
406
- $ this ->assertEquals (
407
- 0 ,
406
+ $ this ->assertNull (
408
407
$ builder ->offset
409
408
);
410
409
411
410
$ builder ->from (100 );
412
411
413
- $ this ->assertEquals (
412
+ $ this ->assertSame (
414
413
100 ,
415
414
$ builder ->offset
416
415
);
@@ -421,7 +420,7 @@ public function testCollapse()
421
420
$ builder = (new FilterBuilder ($ this ->mockModel ()))
422
421
->collapse ('foo ' );
423
422
424
- $ this ->assertEquals (
423
+ $ this ->assertSame (
425
424
'foo ' ,
426
425
$ builder ->collapse
427
426
);
@@ -432,7 +431,7 @@ public function testSelect()
432
431
$ builder = (new FilterBuilder ($ this ->mockModel ()))
433
432
->select (['foo ' , 'bar ' ]);
434
433
435
- $ this ->assertEquals (
434
+ $ this ->assertSame (
436
435
['foo ' , 'bar ' ],
437
436
$ builder ->select
438
437
);
@@ -444,7 +443,7 @@ public function testWithTrashed()
444
443
->withTrashed ()
445
444
->where ('foo ' , 'bar ' );
446
445
447
- $ this ->assertEquals (
446
+ $ this ->assertSame (
448
447
[
449
448
'must ' => [
450
449
[
@@ -465,7 +464,7 @@ public function testOnlyTrashed()
465
464
->onlyTrashed ()
466
465
->where ('foo ' , 'bar ' );
467
466
468
- $ this ->assertEquals (
467
+ $ this ->assertSame (
469
468
[
470
469
'must ' => [
471
470
[
0 commit comments