File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
Model/ResourceModel/Report
Test/Unit/Model/ResourceModel/Report Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -224,11 +224,11 @@ private function getRange(Select $select): array
224
224
if (!isset ($ this ->rangesByQuery [$ queryHash ])) {
225
225
226
226
$ connection = $ this ->getConnection ();
227
- $ range = [];
228
227
try {
229
228
$ query = $ connection ->query ($ select );
230
229
$ range = $ query ->fetchAll (\Zend_Db::FETCH_COLUMN );
231
- } catch (\Exception $ e ) {
230
+ } catch (\Exception ) {
231
+ $ range = [];
232
232
}
233
233
234
234
$ this ->rangesByQuery [$ queryHash ] = $ range ;
Original file line number Diff line number Diff line change @@ -358,11 +358,7 @@ public function testAggregateWithMultipleOrderDatesAndNoDates(
358
358
$ connection ->expects ($ this ->any ())->method ('select ' )->willReturn ($ select );
359
359
$ query = $ this ->createMock (\Zend_Db_Statement_Interface::class);
360
360
$ query ->expects ($ this ->once ())->method ('fetchAll ' )->willReturn ($ randomDates );
361
- $ calls = 3 ;
362
- if ($ from && $ to ) {
363
- $ calls = 4 ;
364
- }
365
- $ connection ->expects ($ this ->exactly ($ calls ))->method ('query ' )->willReturn ($ query );
361
+ $ connection ->expects ($ this ->exactly (3 ))->method ('query ' )->willReturn ($ query );
366
362
$ resource = $ this ->createMock (ResourceConnection::class);
367
363
$ resource ->expects ($ this ->any ())
368
364
->method ('getConnection ' )
You can’t perform that action at this time.
0 commit comments