File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ public function refund(
160
160
$ this ->validateForRefund ($ creditmemo );
161
161
$ creditmemo ->setState (\Magento \Sales \Model \Order \Creditmemo::STATE_REFUNDED );
162
162
163
- $ connection = $ this ->getResource ()->getConnectionByName ('sales ' );
163
+ $ connection = $ this ->getResource ()->getConnection ('sales ' );
164
164
$ connection ->beginTransaction ();
165
165
try {
166
166
$ order = $ this ->getPaymentAdapter ()->refund (
Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ public function testRefund()
248
248
$ adapterMock = $ this ->getMockBuilder (\Magento \Framework \DB \Adapter \AdapterInterface::class)
249
249
->disableOriginalConstructor ()
250
250
->getMockForAbstractClass ();
251
- $ resourceMock ->expects ($ this ->once ())->method ('getConnectionByName ' )->with ('sales ' )->willReturn ($ adapterMock );
251
+ $ resourceMock ->expects ($ this ->once ())->method ('getConnection ' )->with ('sales ' )->willReturn ($ adapterMock );
252
252
$ adapterMock ->expects ($ this ->once ())->method ('beginTransaction ' );
253
253
$ paymentAdapterMock ->expects ($ this ->once ())
254
254
->method ('refund ' )
You can’t perform that action at this time.
0 commit comments