Skip to content

Commit 372d2ac

Browse files
committed
MAGETWO-69185: Unable to create shipping label if Region not specified for shipping origin
1 parent 5134e04 commit 372d2ac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/code/Magento/Shipping/Test/Unit/Model/Shipping/LabelsTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ public function testRequestToShipment($regionId)
104104
$order = $this->getMockBuilder(\Magento\Sales\Model\Order::class)
105105
->disableOriginalConstructor()
106106
->getMock();
107-
$this->user->expects($this->exactly(2))->method('getFirstname')->willReturn('John');
108-
$this->user->expects($this->exactly(2))->method('getLastname')->willReturn('Doe');
107+
$this->user->expects($this->atLeastOnce())->method('getFirstname')->willReturn('John');
108+
$this->user->expects($this->atLeastOnce())->method('getLastname')->willReturn('Doe');
109109
$this->user->expects($this->once())->method('getName')->willReturn('John Doe');
110110
$this->user->expects($this->once())->method('getEmail')->willReturn('admin@admin.test.com');
111111
$shippingMethod = $this->getMockBuilder(\Magento\Framework\DataObject::class)
@@ -170,7 +170,7 @@ public function testRequestToShipmentLocalizedException($isShipmentCarrierNotNul
170170
->disableOriginalConstructor()
171171
->setMethods(['getCarrierCode'])
172172
->getMock();
173-
$order->expects($this->exactly(2))
173+
$order->expects($this->atLeastOnce())
174174
->method('getShippingMethod')
175175
->with(true)
176176
->willReturn($shippingMethod);

0 commit comments

Comments
 (0)