Skip to content

Commit 140e43f

Browse files
#22810: Unit and static tests fix.
1 parent f76f53b commit 140e43f

File tree

6 files changed

+15
-11
lines changed

6 files changed

+15
-11
lines changed

app/code/Magento/Sales/Model/Order/Email/Sender.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212

1313
/**
1414
* Class Sender
15-
* @api
1615
*
16+
* phpcs:disable Magento2.Classes.AbstractApi
17+
* @api
1718
* @since 100.0.2
1819
*/
1920
abstract class Sender

app/code/Magento/Sales/Test/Unit/Model/Order/Email/Sender/CreditmemoSenderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected function setUp()
5757

5858
$this->identityContainerMock = $this->createPartialMock(
5959
\Magento\Sales\Model\Order\Email\Container\CreditmemoIdentity::class,
60-
['getStore', 'isEnabled', 'getConfigValue', 'getTemplateId', 'getGuestTemplateId']
60+
['getStore', 'isEnabled', 'getConfigValue', 'getTemplateId', 'getGuestTemplateId', 'getCopyMethod']
6161
);
6262
$this->identityContainerMock->expects($this->any())
6363
->method('getStore')

app/code/Magento/Sales/Test/Unit/Model/Order/Email/Sender/InvoiceSenderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected function setUp()
5757

5858
$this->identityContainerMock = $this->createPartialMock(
5959
\Magento\Sales\Model\Order\Email\Container\InvoiceIdentity::class,
60-
['getStore', 'isEnabled', 'getConfigValue', 'getTemplateId', 'getGuestTemplateId']
60+
['getStore', 'isEnabled', 'getConfigValue', 'getTemplateId', 'getGuestTemplateId', 'getCopyMethod']
6161
);
6262
$this->identityContainerMock->expects($this->any())
6363
->method('getStore')

app/code/Magento/Sales/Test/Unit/Model/Order/Email/Sender/OrderSenderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protected function setUp()
3030

3131
$this->identityContainerMock = $this->createPartialMock(
3232
\Magento\Sales\Model\Order\Email\Container\OrderIdentity::class,
33-
['getStore', 'isEnabled', 'getConfigValue', 'getTemplateId', 'getGuestTemplateId']
33+
['getStore', 'isEnabled', 'getConfigValue', 'getTemplateId', 'getGuestTemplateId', 'getCopyMethod']
3434
);
3535
$this->identityContainerMock->expects($this->any())
3636
->method('getStore')
@@ -77,7 +77,7 @@ public function testSend($configValue, $forceSyncMode, $emailSendingResult, $sen
7777
->willReturn($emailSendingResult);
7878

7979
if ($emailSendingResult) {
80-
$this->identityContainerMock->expects($this->once())
80+
$this->identityContainerMock->expects($senderSendException ? $this->never() : $this->once())
8181
->method('getCopyMethod')
8282
->willReturn('copy');
8383

app/code/Magento/Sales/Test/Unit/Model/Order/Email/Sender/ShipmentSenderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected function setUp()
5757

5858
$this->identityContainerMock = $this->createPartialMock(
5959
\Magento\Sales\Model\Order\Email\Container\ShipmentIdentity::class,
60-
['getStore', 'isEnabled', 'getConfigValue', 'getTemplateId', 'getGuestTemplateId']
60+
['getStore', 'isEnabled', 'getConfigValue', 'getTemplateId', 'getGuestTemplateId', 'getCopyMethod']
6161
);
6262
$this->identityContainerMock->expects($this->any())
6363
->method('getStore')

app/code/Magento/Sales/Test/Unit/Model/Order/Email/SenderBuilderTest.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,14 @@ protected function setUp()
4848
['getTemplateVars', 'getTemplateOptions', 'getTemplateId']
4949
);
5050

51-
$this->storeMock = $this->createPartialMock(\Magento\Store\Model\Store::class, [
52-
'getStoreId',
53-
'__wakeup',
54-
'getId',
55-
]);
51+
$this->storeMock = $this->createPartialMock(
52+
\Magento\Store\Model\Store::class,
53+
[
54+
'getStoreId',
55+
'__wakeup',
56+
'getId',
57+
]
58+
);
5659

5760
$this->identityContainerMock = $this->createPartialMock(
5861
\Magento\Sales\Model\Order\Email\Container\ShipmentIdentity::class,

0 commit comments

Comments
 (0)