29 $this->addressRenderer->expects($this->any())->method(
'format')->willReturn(1);
30 $this->creditmemoMock = $this->createPartialMock(
32 [
'getStore',
'__wakeup',
'getOrder']
34 $this->creditmemoMock->expects($this->any())
36 ->will($this->returnValue($this->storeMock));
37 $this->creditmemoMock->expects($this->any())
39 ->will($this->returnValue($this->orderMock));
41 $this->templateContainerMock,
42 $this->identityContainerMock,
43 $this->senderBuilderFactoryMock,
45 $this->addressRenderer,
46 $this->eventManagerMock
54 $result = $this->sender->send($this->creditmemoMock);
62 $this->templateContainerMock->expects($this->once())
63 ->method(
'setTemplateVars')
67 'order' => $this->orderMock,
68 'creditmemo' => $this->creditmemoMock,
71 'store' => $this->storeMock,
72 'formattedShippingAddress' =>
null,
73 'formattedBillingAddress' => 1
78 $result = $this->sender->send($this->creditmemoMock);
85 $comment =
'comment_test';
87 $this->orderMock->expects($this->once())
88 ->method(
'getCustomerIsGuest')
89 ->will($this->returnValue(
false));
91 $this->identityContainerMock->expects($this->once())
93 ->will($this->returnValue(
true));
94 $this->templateContainerMock->expects($this->once())
95 ->method(
'setTemplateVars')
99 'order' => $this->orderMock,
100 'creditmemo' => $this->creditmemoMock,
101 'comment' => $comment,
103 'store' => $this->storeMock,
104 'formattedShippingAddress' => 1,
105 'formattedBillingAddress' => 1
110 $result = $this->sender->send($this->creditmemoMock,
true, $comment);
117 $comment =
'comment_test';
119 $this->orderMock->expects($this->once())
120 ->method(
'getCustomerIsGuest')
121 ->will($this->returnValue(
false));
123 $this->identityContainerMock->expects($this->once())
124 ->method(
'isEnabled')
125 ->will($this->returnValue(
true));
126 $this->templateContainerMock->expects($this->once())
127 ->method(
'setTemplateVars')
131 'order' => $this->orderMock,
132 'creditmemo' => $this->creditmemoMock,
134 'comment' => $comment,
135 'store' => $this->storeMock,
136 'formattedShippingAddress' => 1,
137 'formattedBillingAddress' => 1
142 $result = $this->sender->send($this->creditmemoMock,
false, $comment);
stepSendWithCallSendCopyTo()
stepIdentityContainerInit($identityMockClassName)
stepSendWithoutSendCopy()
stepAddressFormat($billingAddress, $isVirtual=false)