Skip to content

Commit 321f5f8

Browse files
cparticaAnna Bukatar
authored andcommitted
MAGETWO-49212: [GITHUB] Magento\Sales\Model\OrderRepository::getList() is incomplete #3018
- fixing a static failiure & unit test exception
1 parent f10d802 commit 321f5f8

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class OrderRepositoryTest extends \PHPUnit_Framework_TestCase
1919
* @var \Magento\Sales\Model\OrderRepository
2020
*/
2121
protected $model;
22+
2223
/**
2324
* @var Metadata|\PHPUnit_Framework_MockObject_MockObject
2425
*/
@@ -72,8 +73,13 @@ public function testGetList()
7273
$sortOrderMock = $this->getMock('\Magento\Framework\Api\SortOrder', [], [], '', false);
7374
$itemsMock = $this->getMock('Magento\Sales\Model\Order', [], [], '', false);
7475

75-
76-
$extensionAttributes = $this->getMock('\Magento\Sales\Api\Data\OrderExtension', [], [], '', false);
76+
$extensionAttributes = $this->getMock(
77+
'\Magento\Sales\Api\Data\OrderExtension',
78+
['getShippingAssignments'],
79+
[],
80+
'',
81+
false
82+
);
7783
$shippingAssignmentBuilder = $this->getMock(
7884
'\Magento\Sales\Model\Order\ShippingAssignmentBuilder',
7985
[],
@@ -83,7 +89,7 @@ public function testGetList()
8389
);
8490

8591
$itemsMock->expects($this->once())->method('getExtensionAttributes')->willReturn($extensionAttributes);
86-
$extensionAttributes->expects($this->once())
92+
$extensionAttributes->expects($this->any())
8793
->method('getShippingAssignments')
8894
->willReturn($shippingAssignmentBuilder);
8995

0 commit comments

Comments
 (0)