26 $this->addressRenderer->expects($this->any())->method(
'format')->willReturn(1);
27 $this->shipmentMock = $this->createPartialMock(
29 [
'getStore',
'__wakeup',
'getOrder']
31 $this->shipmentMock->expects($this->any())
33 ->will($this->returnValue($this->storeMock));
34 $this->shipmentMock->expects($this->any())
36 ->will($this->returnValue($this->orderMock));
39 $this->templateContainerMock,
40 $this->identityContainerMock,
41 $this->senderBuilderFactoryMock,
43 $this->addressRenderer,
44 $this->eventManagerMock
51 $result = $this->sender->send($this->shipmentMock);
58 $comment =
'comment_test';
60 $this->orderMock->expects($this->once())
61 ->method(
'getCustomerIsGuest')
62 ->will($this->returnValue(
false));
65 $this->identityContainerMock->expects($this->once())
67 ->will($this->returnValue(
true));
68 $this->templateContainerMock->expects($this->once())
69 ->method(
'setTemplateVars')
73 'order' => $this->orderMock,
74 'shipment' => $this->shipmentMock,
76 'comment' => $comment,
77 'store' => $this->storeMock,
78 'formattedShippingAddress' => 1,
79 'formattedBillingAddress' => 1
84 $result = $this->sender->send($this->shipmentMock,
true, $comment);
91 $comment =
'comment_test';
93 $this->orderMock->expects($this->once())
94 ->method(
'getCustomerIsGuest')
95 ->will($this->returnValue(
false));
98 $this->identityContainerMock->expects($this->once())
100 ->will($this->returnValue(
true));
101 $this->templateContainerMock->expects($this->once())
102 ->method(
'setTemplateVars')
106 'order' => $this->orderMock,
107 'shipment' => $this->shipmentMock,
109 'comment' => $comment,
110 'store' => $this->storeMock,
111 'formattedShippingAddress' => 1,
112 'formattedBillingAddress' => 1
117 $result = $this->sender->send($this->shipmentMock,
false, $comment);
123 $isVirtualOrder =
true;
127 $this->identityContainerMock->expects($this->once())
128 ->method(
'isEnabled')
129 ->will($this->returnValue(
false));
130 $this->templateContainerMock->expects($this->once())
131 ->method(
'setTemplateVars')
135 'order' => $this->orderMock,
136 'shipment' => $this->shipmentMock,
137 'billing' => $this->addressMock,
139 'store' => $this->storeMock,
140 'formattedShippingAddress' =>
null,
141 'formattedBillingAddress' => 1
145 $this->assertFalse($this->sender->send($this->shipmentMock));
stepSendWithCallSendCopyTo()
stepIdentityContainerInit($identityMockClassName)
stepSendWithoutSendCopy()
stepAddressFormat($billingAddress, $isVirtual=false)