@@ -21,9 +21,9 @@ class RelationTest extends \PHPUnit_Framework_TestCase
21
21
protected $ addressHandlerMock ;
22
22
23
23
/**
24
- * @var \Magento\Sales\Model\Resource\Order\Item |\PHPUnit_Framework_MockObject_MockObject
24
+ * @var \Magento\Sales\Api\OrderItemRepositoryInterface |\PHPUnit_Framework_MockObject_MockObject
25
25
*/
26
- protected $ orderItemResourceMock ;
26
+ protected $ orderItemRepositoryMock ;
27
27
28
28
/**
29
29
* @var \Magento\Sales\Model\Resource\Order\Payment|\PHPUnit_Framework_MockObject_MockObject
@@ -71,14 +71,14 @@ public function setUp()
71
71
]
72
72
)
73
73
->getMock ();
74
- $ this ->orderItemResourceMock = $ this ->getMockBuilder ('Magento\Sales\Model\Resource\Order\Item ' )
74
+ $ this ->orderItemRepositoryMock = $ this ->getMockBuilder ('Magento\Sales\Api\OrderItemRepositoryInterface ' )
75
75
->disableOriginalConstructor ()
76
76
->setMethods (
77
77
[
78
78
'save '
79
79
]
80
80
)
81
- ->getMock ();
81
+ ->getMockForAbstractClass ();
82
82
$ this ->orderPaymentResourceMock = $ this ->getMockBuilder ('Magento\Sales\Model\Resource\Order\Payment ' )
83
83
->disableOriginalConstructor ()
84
84
->setMethods (
@@ -154,7 +154,7 @@ public function setUp()
154
154
->getMock ();
155
155
$ this ->relationProcessor = new \Magento \Sales \Model \Resource \Order \Relation (
156
156
$ this ->addressHandlerMock ,
157
- $ this ->orderItemResourceMock ,
157
+ $ this ->orderItemRepositoryMock ,
158
158
$ this ->orderPaymentResourceMock ,
159
159
$ this ->statusHistoryResource
160
160
);
@@ -184,7 +184,7 @@ public function testProcessRelation()
184
184
->method ('setOrder ' )
185
185
->with ($ this ->orderMock )
186
186
->willReturnSelf ();
187
- $ this ->orderItemResourceMock ->expects ($ this ->once ())
187
+ $ this ->orderItemRepositoryMock ->expects ($ this ->once ())
188
188
->method ('save ' )
189
189
->with ($ this ->orderItemMock )
190
190
->willReturnSelf ();
0 commit comments