Skip to content

Commit 65abe1d

Browse files
committed
MAGETWO-54677: Order status change after Shipment creation through API
1 parent 058df3d commit 65abe1d

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

app/code/Magento/Sales/Test/Unit/Model/Order/Shipment/Validation/QuantityValidatorTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ public function testValidateTrackWithoutOrderId()
4545
$this->shipmentMock->expects($this->once())
4646
->method('getOrderId')
4747
->willReturn(null);
48-
$this->assertEquals([__('Order Id is required for shipment document')], $this->validator->validate($this->shipmentMock));
48+
$this->assertEquals(
49+
[__('Order Id is required for shipment document')],
50+
$this->validator->validate($this->shipmentMock)
51+
);
4952
}
5053

5154
public function testValidateTrackWithoutItems()
@@ -56,6 +59,9 @@ public function testValidateTrackWithoutItems()
5659
$this->shipmentMock->expects($this->once())
5760
->method('getItems')
5861
->willReturn(null);
59-
$this->assertEquals([__('You can\'t create a shipment without products.')], $this->validator->validate($this->shipmentMock));
62+
$this->assertEquals(
63+
[__('You can\'t create a shipment without products.')],
64+
$this->validator->validate($this->shipmentMock)
65+
);
6066
}
6167
}

app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/Save.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
namespace Magento\Shipping\Controller\Adminhtml\Order\Shipment;
88

99
use Magento\Backend\App\Action;
10-
use Magento\Framework\App\ObjectManager;
1110
use Magento\Sales\Model\Order\Shipment\Validation\QuantityValidator;
1211

1312
/**
@@ -193,7 +192,7 @@ public function execute()
193192
private function getShipmentValidator()
194193
{
195194
if ($this->shipmentValidator === null) {
196-
$this->shipmentValidator = ObjectManager::getInstance()->get(
195+
$this->shipmentValidator = $this->_objectManager->get(
197196
\Magento\Sales\Model\Order\Shipment\ShipmentValidatorInterface::class
198197
);
199198
}

0 commit comments

Comments
 (0)