Skip to content

Commit ffb15d2

Browse files
author
Dmytro Poperechnyy
committed
MAGETWO-44539: Issues with "Orders and Returns" widget
- Renamed method loadByIncrementIdAndStore to loadByIncrementIdAndStoreId;
1 parent 476968e commit ffb15d2

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

app/code/Magento/Sales/Helper/Guest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function loadValidOrder(App\RequestInterface $request)
150150
}
151151

152152
if (!$errors) {
153-
$order = $order->loadByIncrementIdAndStore($incrementId, $storeId);
153+
$order = $order->loadByIncrementIdAndStoreId($incrementId, $storeId);
154154
}
155155

156156
$errors = true;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,13 +444,13 @@ public function loadByIncrementId($incrementId)
444444
}
445445

446446
/**
447-
* Load order by system increment identifier and store
447+
* Load order by system increment and store identifiers
448448
*
449449
* @param string $incrementId
450450
* @param string $storeId
451451
* @return \Magento\Sales\Model\Order
452452
*/
453-
public function loadByIncrementIdAndStore($incrementId, $storeId)
453+
public function loadByIncrementIdAndStoreId($incrementId, $storeId)
454454
{
455455
$orderCollection = $this->getSalesOrderCollection(
456456
[

app/code/Magento/Sales/Test/Unit/Helper/GuestTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ protected function setUp()
7575
$this->salesOrderMock = $this->getMock(
7676
'Magento\Sales\Model\Order',
7777
[
78-
'getProtectCode', 'loadByIncrementIdAndStore', 'loadByIncrementId',
78+
'getProtectCode', 'loadByIncrementIdAndStoreId', 'loadByIncrementId',
7979
'getId', 'getBillingAddress', '__wakeup'
8080
],
8181
[],
@@ -119,7 +119,7 @@ public function testLoadValidOrderNotEmptyPost()
119119
$this->storeManagerInterfaceMock->expects($this->once())->method('getStore')->willReturn($this->storeModelMock);
120120
$this->storeModelMock->expects($this->once())->method('getId')->willReturn($storeId);
121121
$this->orderFactoryMock->expects($this->once())->method('create')->willReturn($this->salesOrderMock);
122-
$this->salesOrderMock->expects($this->once())->method('loadByIncrementIdAndStore')->willReturnSelf();
122+
$this->salesOrderMock->expects($this->once())->method('loadByIncrementIdAndStoreId')->willReturnSelf();
123123
$this->salesOrderMock->expects($this->any())->method('getId')->willReturn($incrementId);
124124

125125
$billingAddressMock = $this->getMock(

app/code/Magento/Sales/Test/Unit/Model/OrderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ public function testGetStatusHistories()
743743
}
744744
}
745745

746-
public function testLoadByIncrementIdAndStore()
746+
public function testLoadByIncrementIdAndStoreId()
747747
{
748748
$incrementId = '000000001';
749749
$storeId = '2';
@@ -754,7 +754,7 @@ public function testLoadByIncrementIdAndStore()
754754
$this->salesOrderCollectionMock->expects($this->any())->method('addFieldToFilter')->willReturnSelf();
755755
$this->salesOrderCollectionMock->expects($this->once())->method('load')->willReturnSelf();
756756
$this->salesOrderCollectionMock->expects($this->once())->method('getFirstItem')->willReturn($this->order);
757-
$this->assertSame($this->order, $this->order->loadByIncrementIdAndStore($incrementId, $storeId));
757+
$this->assertSame($this->order, $this->order->loadByIncrementIdAndStoreId($incrementId, $storeId));
758758
}
759759

760760
public function notInvoicingStatesProvider()

0 commit comments

Comments
 (0)