40 $this->currentCustomerMock = $this->getMockBuilder(\
Magento\Customer\Helper\Session\CurrentCustomer::class)
41 ->disableOriginalConstructor()
43 $this->customerAccountManagementMock = $this->getMockBuilder(
44 \
Magento\Customer\Api\AccountManagementInterface::class
45 )->disableOriginalConstructor()->getMock();
47 $this->currentCustomerAddress = new \Magento\Customer\Helper\Session\CurrentCustomerAddress(
48 $this->currentCustomerMock,
49 $this->customerAccountManagementMock
58 $this->currentCustomerMock->expects($this->once())
59 ->method(
'getCustomerId')
60 ->will($this->returnValue($this->customerCurrentId));
62 $this->customerAccountManagementMock->expects($this->once())
63 ->method(
'getDefaultBillingAddress')
64 ->will($this->returnValue($this->customerAddressDataMock));
66 $this->customerAddressDataMock,
67 $this->currentCustomerAddress->getDefaultBillingAddress()
76 $this->currentCustomerMock->expects($this->once())
77 ->method(
'getCustomerId')
78 ->will($this->returnValue($this->customerCurrentId));
79 $this->customerAccountManagementMock->expects($this->once())
80 ->method(
'getDefaultShippingAddress')
81 ->will($this->returnValue($this->customerAddressDataMock));
83 $this->customerAddressDataMock,
84 $this->currentCustomerAddress->getDefaultShippingAddress()
$customerAccountManagementMock
testGetDefaultBillingAddress()
testGetDefaultShippingAddress()