55 $this->addressMock = $this->createPartialMock(
57 [
'__wakeup',
'getOrderId',
'hasDataChanges',
'beforeSave',
'afterSave',
'validateBeforeSave',
'getOrder']
59 $this->quoteMock = $this->createPartialMock(\
Magento\
Quote\Model\Quote::class, [
'__wakeup',
'getId']);
60 $this->appResourceMock = $this->createMock(\
Magento\Framework\
App\ResourceConnection::class);
61 $this->connectionMock = $this->createMock(\
Magento\Framework\DB\Adapter\Pdo\Mysql::class);
62 $this->entitySnapshotMock = $this->createMock(
65 $this->relationCompositeMock = $this->createMock(
68 $this->appResourceMock->expects($this->any())
69 ->method(
'getConnection')
70 ->will($this->returnValue($this->connectionMock));
71 $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
72 $this->connectionMock->expects($this->any())
73 ->method(
'describeTable')
74 ->will($this->returnValue([]));
75 $this->connectionMock->expects($this->any())
77 $this->connectionMock->expects($this->any())
78 ->method(
'lastInsertId');
82 'resource' => $this->appResourceMock,
83 'entitySnapshot' => $this->entitySnapshotMock,
84 'entityRelationComposite' => $this->relationCompositeMock
91 $this->entitySnapshotMock->expects($this->once())
92 ->method(
'isModified')
93 ->with($this->addressMock)
95 $this->entitySnapshotMock->expects($this->once())
96 ->method(
'registerSnapshot')
97 ->with($this->addressMock);
98 $this->relationCompositeMock->expects($this->once())
99 ->method(
'processRelations')
100 ->with($this->addressMock);
101 $this->addressResource->save($this->addressMock);