@@ -39,6 +39,8 @@ public function test_if_the_update_method_builds_correct_payload()
39
39
]);
40
40
41
41
(new ElasticEngine ())->update (Collection::make ([$ model ]));
42
+
43
+ $ this ->addToAssertionCount (1 );
42
44
}
43
45
44
46
public function test_if_the_delete_method_builds_correct_payload ()
@@ -54,6 +56,8 @@ public function test_if_the_delete_method_builds_correct_payload()
54
56
$ model = $ this ->mockModel (['id ' => 1 ]);
55
57
56
58
(new ElasticEngine ())->delete (Collection::make ([$ model ]));
59
+
60
+ $ this ->addToAssertionCount (1 );
57
61
}
58
62
59
63
public function test_if_the_search_method_builds_correct_payload ()
@@ -81,6 +85,8 @@ public function test_if_the_search_method_builds_correct_payload()
81
85
$ builder = new SearchBuilder ($ model , 'test query ' );
82
86
83
87
(new ElasticEngine ())->search ($ builder );
88
+
89
+ $ this ->addToAssertionCount (1 );
84
90
}
85
91
86
92
public function test_if_the_search_method_with_specified_limit_builds_correct_payload ()
@@ -109,6 +115,8 @@ public function test_if_the_search_method_with_specified_limit_builds_correct_pa
109
115
$ builder = (new SearchBuilder ($ model , 'test query ' ))->take (10 );
110
116
111
117
(new ElasticEngine ())->search ($ builder );
118
+
119
+ $ this ->addToAssertionCount (1 );
112
120
}
113
121
114
122
public function test_if_the_search_method_with_specified_order_builds_correct_payload ()
@@ -139,6 +147,8 @@ public function test_if_the_search_method_with_specified_order_builds_correct_pa
139
147
$ builder = (new SearchBuilder ($ model , 'test query ' ))->orderBy ('name ' , 'asc ' );
140
148
141
149
(new ElasticEngine ())->search ($ builder );
150
+
151
+ $ this ->addToAssertionCount (1 );
142
152
}
143
153
144
154
public function test_if_the_search_method_with_specified_where_clause_builds_correct_payload ()
@@ -224,6 +234,8 @@ public function test_if_the_search_method_with_specified_where_clause_builds_cor
224
234
->where ('used ' , '<> ' , 'yes ' );
225
235
226
236
(new ElasticEngine ())->search ($ builder );
237
+
238
+ $ this ->addToAssertionCount (1 );
227
239
}
228
240
229
241
public function test_if_the_search_method_with_specified_whereIn_clause_builds_correct_payload ()
@@ -262,6 +274,8 @@ public function test_if_the_search_method_with_specified_whereIn_clause_builds_c
262
274
$ builder = (new SearchBuilder ($ model , 'test query ' ))->whereIn ('id ' , [1 , 2 , 3 , 4 , 5 ]);
263
275
264
276
(new ElasticEngine ())->search ($ builder );
277
+
278
+ $ this ->addToAssertionCount (1 );
265
279
}
266
280
267
281
public function test_if_the_search_method_with_specified_whereNotIn_clause_builds_correct_payload ()
@@ -300,6 +314,8 @@ public function test_if_the_search_method_with_specified_whereNotIn_clause_build
300
314
$ builder = (new SearchBuilder ($ model , 'test query ' ))->whereNotIn ('id ' , [1 , 2 , 3 , 4 , 5 ]);
301
315
302
316
(new ElasticEngine ())->search ($ builder );
317
+
318
+ $ this ->addToAssertionCount (1 );
303
319
}
304
320
305
321
public function test_if_the_search_method_with_specified_whereBetween_clause_builds_correct_payload ()
@@ -341,6 +357,8 @@ public function test_if_the_search_method_with_specified_whereBetween_clause_bui
341
357
$ builder = (new SearchBuilder ($ model , 'test query ' ))->whereBetween ('price ' , [100 , 300 ]);
342
358
343
359
(new ElasticEngine ())->search ($ builder );
360
+
361
+ $ this ->addToAssertionCount (1 );
344
362
}
345
363
346
364
public function test_if_the_search_method_with_specified_whereNotBetween_clause_builds_correct_payload ()
@@ -382,6 +400,8 @@ public function test_if_the_search_method_with_specified_whereNotBetween_clause_
382
400
$ builder = (new SearchBuilder ($ model , 'test query ' ))->whereNotBetween ('price ' , [100 , 300 ]);
383
401
384
402
(new ElasticEngine ())->search ($ builder );
403
+
404
+ $ this ->addToAssertionCount (1 );
385
405
}
386
406
387
407
public function test_if_the_search_method_with_specified_whereExists_clause_builds_correct_payload ()
@@ -420,6 +440,8 @@ public function test_if_the_search_method_with_specified_whereExists_clause_buil
420
440
$ builder = (new SearchBuilder ($ model , 'test query ' ))->whereExists ('sale ' );
421
441
422
442
(new ElasticEngine ())->search ($ builder );
443
+
444
+ $ this ->addToAssertionCount (1 );
423
445
}
424
446
425
447
public function test_if_the_search_method_with_specified_whereNotExists_clause_builds_correct_payload ()
@@ -458,6 +480,8 @@ public function test_if_the_search_method_with_specified_whereNotExists_clause_b
458
480
$ builder = (new SearchBuilder ($ model , 'test query ' ))->whereNotExists ('sale ' );
459
481
460
482
(new ElasticEngine ())->search ($ builder );
483
+
484
+ $ this ->addToAssertionCount (1 );
461
485
}
462
486
463
487
public function test_if_the_search_method_with_specified_whereRegexp_clause_builds_correct_payload ()
@@ -499,6 +523,8 @@ public function test_if_the_search_method_with_specified_whereRegexp_clause_buil
499
523
$ builder = (new SearchBuilder ($ model , 'phone ' ))->whereRegexp ('brand ' , 'a[a-z]+ ' , 'ALL ' );
500
524
501
525
(new ElasticEngine ())->search ($ builder );
526
+
527
+ $ this ->addToAssertionCount (1 );
502
528
}
503
529
504
530
public function test_if_the_search_method_with_specified_rule_builds_correct_payload ()
@@ -534,6 +560,8 @@ public function test_if_the_search_method_with_specified_rule_builds_correct_pay
534
560
});
535
561
536
562
(new ElasticEngine ())->search ($ builder );
563
+
564
+ $ this ->addToAssertionCount (1 );
537
565
}
538
566
539
567
public function test_if_the_search_method_with_an_asterisk_builds_correct_payload ()
@@ -559,6 +587,8 @@ public function test_if_the_search_method_with_an_asterisk_builds_correct_payloa
559
587
$ builder = new FilterBuilder ($ model );
560
588
561
589
(new ElasticEngine ())->search ($ builder );
590
+
591
+ $ this ->addToAssertionCount (1 );
562
592
}
563
593
564
594
public function test_if_the_searchRaw_method_builds_correct_payload ()
@@ -594,6 +624,8 @@ public function test_if_the_searchRaw_method_builds_correct_payload()
594
624
]
595
625
]
596
626
]);
627
+
628
+ $ this ->addToAssertionCount (1 );
597
629
}
598
630
599
631
public function test_if_the_paginate_method_builds_correct_payload ()
@@ -623,6 +655,8 @@ public function test_if_the_paginate_method_builds_correct_payload()
623
655
$ builder = new SearchBuilder ($ model , 'test query ' );
624
656
625
657
(new ElasticEngine ())->paginate ($ builder , 8 , 3 );
658
+
659
+ $ this ->addToAssertionCount (1 );
626
660
}
627
661
628
662
protected function getElasticSearchResponse ()
@@ -733,6 +767,8 @@ public function test_if_the_explain_method_builds_correct_payload()
733
767
$ builder = new SearchBuilder ($ model , 'test query ' );
734
768
735
769
(new ElasticEngine ())->explain ($ builder );
770
+
771
+ $ this ->addToAssertionCount (1 );
736
772
}
737
773
738
774
public function test_if_the_profile_method_builds_correct_payload ()
@@ -761,5 +797,7 @@ public function test_if_the_profile_method_builds_correct_payload()
761
797
$ builder = new SearchBuilder ($ model , 'test query ' );
762
798
763
799
(new ElasticEngine ())->profile ($ builder );
800
+
801
+ $ this ->addToAssertionCount (1 );
764
802
}
765
803
}
0 commit comments