@@ -37,7 +37,7 @@ public function updateAddsObjectsToIndex()
3737 public function deleteRemovesObjectsToIndex ()
3838 {
3939 $ client = m::mock (Client::class);
40- $ client ->shouldReceive ('getIndex ' )->with ('table ' )->andReturn ($ index = m::mock (Indexes::class));
40+ $ client ->shouldReceive ('index ' )->with ('table ' )->andReturn ($ index = m::mock (Indexes::class));
4141 $ index ->shouldReceive ('deleteDocuments ' )->with ([1 ]);
4242
4343 $ engine = new MeilisearchEngine ($ client );
@@ -48,7 +48,7 @@ public function deleteRemovesObjectsToIndex()
4848 public function searchSendsCorrectParametersToMeilisearch ()
4949 {
5050 $ client = m::mock (Client::class);
51- $ client ->shouldReceive ('getIndex ' )->with ('table ' )->andReturn ($ index = m::mock (Indexes::class));
51+ $ client ->shouldReceive ('index ' )->with ('table ' )->andReturn ($ index = m::mock (Indexes::class));
5252 $ index ->shouldReceive ('search ' )->with ('mustang ' , [
5353 'filters ' => 'foo=1 ' ,
5454 ]);
@@ -145,7 +145,7 @@ public function aModelIsIndexedWithACustomMeilisearchKey()
145145 public function flushAModelWithACustomMeilisearchKey ()
146146 {
147147 $ client = m::mock (Client::class);
148- $ client ->shouldReceive ('getIndex ' )->with ('table ' )->andReturn ($ index = m::mock (Indexes::class));
148+ $ client ->shouldReceive ('index ' )->with ('table ' )->andReturn ($ index = m::mock (Indexes::class));
149149 $ index ->shouldReceive ('deleteAllDocuments ' );
150150
151151 $ engine = new MeilisearchEngine ($ client );
@@ -170,7 +170,7 @@ public function paginationCorrectParameters()
170170 $ page = 2 ;
171171
172172 $ client = m::mock (Client::class);
173- $ client ->shouldReceive ('getIndex ' )->with ('table ' )->andReturn ($ index = m::mock (Indexes::class));
173+ $ client ->shouldReceive ('index ' )->with ('table ' )->andReturn ($ index = m::mock (Indexes::class));
174174 $ index ->shouldReceive ('search ' )->with ('mustang ' , [
175175 'filters ' => 'foo=1 ' ,
176176 'limit ' => $ perPage ,
@@ -206,7 +206,7 @@ public function toSearchableArray()
206206 public function update_empty_searchable_array_from_soft_deleted_model_does_not_add_objects_to_index ()
207207 {
208208 $ client = m::mock (Client::class);
209- $ client ->shouldReceive ('getIndex ' )->with ('table ' )->andReturn ($ index = m::mock (Indexes::class));
209+ $ client ->shouldReceive ('index ' )->with ('table ' )->andReturn ($ index = m::mock (Indexes::class));
210210 $ index ->shouldNotReceive ('addDocuments ' );
211211
212212 $ engine = new MeilisearchEngine ($ client , true );
0 commit comments