@@ -78,12 +78,11 @@ protected function setUp()
78
78
$ this ->selectMock = $ this ->getMock (Select::class, ['getPart ' , 'where ' ], [], '' , false );
79
79
80
80
$ this ->resourceModelAbstractDb = $ this ->getMockBuilder (ResourceModelAbstractDb::class)
81
- ->setMethods (['getMainTable ' ])
82
81
->disableOriginalConstructor ()
83
82
->getMockForAbstractClass ();
84
83
85
84
$ this ->collectionAbstractDbMock = $ this ->getMockBuilder (CollectionAbstractDb::class)
86
- ->setMethods (['getConnection ' , 'getResource ' , 'getSelect ' ])
85
+ ->setMethods (['getConnection ' , 'getSelect ' , 'getMainTable ' ])
87
86
->disableOriginalConstructor ()
88
87
->getMockForAbstractClass ();
89
88
@@ -95,7 +94,7 @@ public function testApply()
95
94
$ filter = new Filter ();
96
95
$ filter ->setValue ('test ' );
97
96
98
- $ this ->resourceModelAbstractDb ->expects ($ this ->any ())
97
+ $ this ->collectionAbstractDbMock ->expects ($ this ->any ())
99
98
->method ('getMainTable ' )
100
99
->willReturn ('testTable ' );
101
100
@@ -117,9 +116,6 @@ public function testApply()
117
116
->method ('where ' )
118
117
->willReturn (null );
119
118
120
- $ this ->collectionAbstractDbMock ->expects ($ this ->once ())
121
- ->method ('getResource ' )
122
- ->willReturn ($ this ->resourceModelAbstractDb );
123
119
$ this ->collectionAbstractDbMock ->expects ($ this ->exactly (2 ))
124
120
->method ('getSelect ' )
125
121
->willReturn ($ this ->selectMock );
0 commit comments