Skip to content

Commit 3cc6ae4

Browse files
Ievgen ShakhsuvarovSerhiy Shkolyarenko
authored andcommitted
MAGETWO-35155: Error appears on Shipping Method page during MultiAdress Checkout if countries are not allowed for shipping
- unit test fix (cherry picked from commit 12c93a5)
1 parent 7cacce2 commit 3cc6ae4

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

app/code/Magento/GiftMessage/Test/Unit/Model/Type/Plugin/MultishippingTest.php

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ protected function setUp()
4141
);
4242
}
4343

44-
public function testBeforeSetShippingMethods()
44+
/**
45+
* @dataProvider beforeSetShippingMethodsDataProvider
46+
* @param array|null $methods
47+
*/
48+
public function testBeforeSetShippingMethods($methods)
4549
{
4650
$this->requestMock->expects($this->once())
4751
->method('getParam')
@@ -52,6 +56,17 @@ public function testBeforeSetShippingMethods()
5256
$subjectMock->expects($this->once())->method('getQuote')->will($this->returnValue($quoteMock));
5357
$this->messageMock->expects($this->once())->method('add')->with('Expected Value', $quoteMock);
5458

55-
$this->plugin->beforeSetShippingMethods($subjectMock, []);
59+
$this->plugin->beforeSetShippingMethods($subjectMock, $methods);
60+
}
61+
62+
/**
63+
* @return array
64+
*/
65+
public function beforeSetShippingMethodsDataProvider()
66+
{
67+
return [
68+
[null],
69+
[[]]
70+
];
5671
}
5772
}

0 commit comments

Comments
 (0)