File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,17 @@ public function getQueryResults()
5353 return $ this ->_queryResults ;
5454 }
5555
56+ /**
57+ * @inheritdoc
58+ */
59+ public function prepare ($ forcePrepare = false )
60+ {
61+ if ($ forcePrepare ) {
62+ $ this ->setTotalCount (null );
63+ }
64+ parent ::prepare ($ forcePrepare );
65+ }
66+
5667 /**
5768 * @return array all aggregations results
5869 */
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ public function testTotalCountAfterSearch()
158158 $ query ->andWhere (['name ' => 'user2 ' ]);
159159 $ provider ->prepare (true );
160160 $ this ->assertCount (1 , $ provider ->getModels ());
161- $ this ->assertEquals (1 , $ provider -> getPagination () ->getPageCount ());
161+ $ this ->assertEquals (1 , $ pagination ->getPageCount ());
162162 $ this ->assertEquals (1 , $ provider ->getTotalCount ());
163163 }
164164}
You can’t perform that action at this time.
0 commit comments