@@ -19,6 +19,7 @@ class OrderRepositoryTest extends \PHPUnit_Framework_TestCase
19
19
* @var \Magento\Sales\Model\OrderRepository
20
20
*/
21
21
protected $ model ;
22
+
22
23
/**
23
24
* @var Metadata|\PHPUnit_Framework_MockObject_MockObject
24
25
*/
@@ -72,8 +73,13 @@ public function testGetList()
72
73
$ sortOrderMock = $ this ->getMock ('\Magento\Framework\Api\SortOrder ' , [], [], '' , false );
73
74
$ itemsMock = $ this ->getMock ('Magento\Sales\Model\Order ' , [], [], '' , false );
74
75
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
+ );
77
83
$ shippingAssignmentBuilder = $ this ->getMock (
78
84
'\Magento\Sales\Model\Order\ShippingAssignmentBuilder ' ,
79
85
[],
@@ -83,7 +89,7 @@ public function testGetList()
83
89
);
84
90
85
91
$ itemsMock ->expects ($ this ->once ())->method ('getExtensionAttributes ' )->willReturn ($ extensionAttributes );
86
- $ extensionAttributes ->expects ($ this ->once ())
92
+ $ extensionAttributes ->expects ($ this ->any ())
87
93
->method ('getShippingAssignments ' )
88
94
->willReturn ($ shippingAssignmentBuilder );
89
95
0 commit comments