@@ -39,4 +39,53 @@ public function testWhereDoesntHave(): void
3939
4040 $ this ->assertDocumentIds ([1 , 328 , 471 ]);
4141 }
42+
43+ public function testWhereNull (): void
44+ {
45+ $ this ->testing ->whereNull ('package ' );
46+
47+ $ this ->assertDocumentIds ([1 , 319 , 328 , 471 ]);
48+ }
49+
50+ public function testWhereNotNull (): void
51+ {
52+ $ this ->testing ->whereNotNull ('package ' );
53+
54+ $ this ->assertDocumentIds ([150 , 405 ]);
55+ }
56+
57+ public function testWhereMatch (): void
58+ {
59+ $ this ->testing ->whereMatch ('search_name ' , 'black leather gloves ' );
60+
61+ $ this ->assertDocumentIds ([319 , 471 ]);
62+ }
63+
64+ public function whereMatchOperatorAnd (): void
65+ {
66+ $ this ->testing ->whereMatch ('search_name ' , 'leather gloves ' , 'and ' );
67+
68+ $ this ->assertDocumentIds ([319 ]);
69+ }
70+
71+ public function testWhereMultiMatch (): void
72+ {
73+ $ this ->testing ->whereMultiMatch (['search_name ' , 'description ' ], 'nice gloves ' );
74+
75+ $ this ->assertDocumentIds ([471 , 328 , 319 ]);
76+ }
77+
78+ public function testWhereMultiMatchDefault (): void
79+ {
80+ $ this ->testing ->whereMultiMatch ([], 'nice gloves ' );
81+
82+ $ this ->assertDocumentIds ([471 , 328 , 319 ]);
83+ }
84+
85+ public function testWhereMultiMatchPrioritized (): void
86+ {
87+ $ this ->testing ->whereMultiMatch (['search_name^2 ' , 'description ' ], 'water ' );
88+
89+ $ this ->assertDocumentOrder ([150 , 405 ]);
90+ }
4291}
0 commit comments