File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
src/Nqxcode/LuceneSearch/Model Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ private function groupedSearchableIdsAsKeys(array $hits)
158158 $ primaryKey = $ model ->getKeyName ();
159159
160160 if (!method_exists ($ model , 'searchableIds ' )) { // If not exists get full id list
161- $ searchableIds = $ model ->lists ($ primaryKey );
161+ $ searchableIds = $ model ->newQuery ()-> lists ($ primaryKey );
162162 } else {
163163 $ searchableIds = $ model ->{'searchableIds ' }();
164164 }
Original file line number Diff line number Diff line change @@ -194,7 +194,10 @@ public function testModels()
194194 list ($ cKey , $ cValue ) = $ this ->config ->classUidPair (new DummyModel );
195195 list ($ pKey , $ pValue ) = $ this ->config ->primaryKeyPair (new DummyModel );
196196
197- $ this ->dummyMock ->shouldReceive ('lists ' )->with ('pk ' )->andReturn ([1 , 2 , 3 ])->byDefault ();
197+ $ this ->dummyMock ->shouldReceive ('newQuery ' )->andReturn (
198+ $ builderMock = m::mock ('Nqxcode\LuceneSearch\Query\Builder ' )
199+ );
200+ $ builderMock ->shouldReceive ('lists ' )->with ('pk ' )->andReturn ([1 , 2 , 3 ])->byDefault ();
198201
199202 $ hitMock = m::mock ('ZendSearch\Lucene\Search\QueryHit ' );
200203 $ hitMock ->{$ cKey } = $ cValue ;
You can’t perform that action at this time.
0 commit comments