23 $this->registryMock = $this->createMock(\
Magento\Framework\Registry::class);
25 $this->collectionUpdater = new \Magento\Sales\Model\Grid\Child\CollectionUpdater(
32 $collectionMock = $this->createMock(
35 $transactionMock = $this->createMock(\
Magento\Sales\Model\
Order\
Payment\Transaction::class);
37 ->expects($this->once())
39 ->with(
'current_transaction')
40 ->will($this->returnValue($transactionMock));
41 $transactionMock->expects($this->once())->method(
'getId')->will($this->returnValue(
'transactionId'));
42 $collectionMock->expects($this->once())->method(
'addParentIdFilter')->will($this->returnSelf());
43 $this->assertEquals($collectionMock, $this->collectionUpdater->update($collectionMock));
testUpdateIfOrderExists()