8 use \Magento\Sales\Model\Order\Email\Sender\OrderCommentSender;
21 $this->addressRenderer->expects($this->any())->method(
'format')->willReturn(1);
23 $this->templateContainerMock,
24 $this->identityContainerMock,
25 $this->senderBuilderFactoryMock,
27 $this->addressRenderer,
28 $this->eventManagerMock
35 $result = $this->sender->send($this->orderMock);
42 $comment =
'comment_test';
44 $this->orderMock->expects($this->once())
45 ->method(
'getCustomerIsGuest')
46 ->will($this->returnValue(
false));
48 $this->identityContainerMock->expects($this->once())
50 ->will($this->returnValue(
true));
51 $this->templateContainerMock->expects($this->once())
52 ->method(
'setTemplateVars')
56 'order' => $this->orderMock,
58 'comment' => $comment,
59 'store' => $this->storeMock,
60 'formattedShippingAddress' => 1,
61 'formattedBillingAddress' => 1
66 $result = $this->sender->send($this->orderMock,
true, $comment);
72 $isVirtualOrder =
true;
76 $this->identityContainerMock->expects($this->once())
78 ->will($this->returnValue(
false));
79 $this->templateContainerMock->expects($this->once())
80 ->method(
'setTemplateVars')
84 'order' => $this->orderMock,
86 'billing' => $this->addressMock,
87 'store' => $this->storeMock,
88 'formattedShippingAddress' =>
null,
89 'formattedBillingAddress' => 1
93 $this->assertFalse($this->sender->send($this->orderMock));
stepIdentityContainerInit($identityMockClassName)
stepSendWithoutSendCopy()
stepAddressFormat($billingAddress, $isVirtual=false)