@@ -541,6 +541,25 @@ public function test_where_in_conditions_are_applied()
541541        $ enginesearch ($ builder
542542    }
543543
544+     public  function  test_where_not_in_conditions_are_applied ()
545+     {
546+         $ buildernew  Builder (new  SearchableModel (), '' );
547+         $ builderwhere ('foo ' , 'bar ' );
548+         $ builderwhere ('bar ' , 'baz ' );
549+         $ builderwhereIn ('qux ' , [1 , 2 ]);
550+         $ builderwhereIn ('quux ' , [1 , 2 ]);
551+         $ builderwhereNotIn ('eaea ' , [3 ]);
552+         $ clientmock (Client::class);
553+         $ clientshouldReceive ('index ' )->once ()->andReturn ($ indexmock (Indexes::class));
554+         $ indexshouldReceive ('rawSearch ' )->once ()->with ($ builderquery , array_filter ([
555+             'filter '  => 'foo="bar" AND bar="baz" AND qux IN [1, 2] AND quux IN [1, 2] AND eaea NOT IN [3] ' ,
556+             'hitsPerPage '  => $ builderlimit ,
557+         ]))->andReturn ([]);
558+ 
559+         $ enginenew  MeilisearchEngine ($ client
560+         $ enginesearch ($ builder
561+     }
562+ 
544563    public  function  test_where_in_conditions_are_applied_without_other_conditions ()
545564    {
546565        $ buildernew  Builder (new  SearchableModel (), '' );
@@ -557,6 +576,23 @@ public function test_where_in_conditions_are_applied_without_other_conditions()
557576        $ enginesearch ($ builder
558577    }
559578
579+     public  function  test_where_not_in_conditions_are_applied_without_other_conditions ()
580+     {
581+         $ buildernew  Builder (new  SearchableModel (), '' );
582+         $ builderwhereIn ('qux ' , [1 , 2 ]);
583+         $ builderwhereIn ('quux ' , [1 , 2 ]);
584+         $ builderwhereNotIn ('eaea ' , [3 ]);
585+         $ clientmock (Client::class);
586+         $ clientshouldReceive ('index ' )->once ()->andReturn ($ indexmock (Indexes::class));
587+         $ indexshouldReceive ('rawSearch ' )->once ()->with ($ builderquery , array_filter ([
588+             'filter '  => 'qux IN [1, 2] AND quux IN [1, 2] AND eaea NOT IN [3] ' ,
589+             'hitsPerPage '  => $ builderlimit ,
590+         ]))->andReturn ([]);
591+ 
592+         $ enginenew  MeilisearchEngine ($ client
593+         $ enginesearch ($ builder
594+     }
595+ 
560596    public  function  test_empty_where_in_conditions_are_applied_correctly ()
561597    {
562598        $ buildernew  Builder (new  SearchableModel (), '' );
0 commit comments