Skip to content

Commit 6c605f4

Browse files
author
Michael Logvin
committed
MAGETWO-43418: Convert usages of quote item to order item with appropriate product options in sales & quote services
1 parent b8e4957 commit 6c605f4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

app/code/Magento/Sales/Test/Unit/Model/Resource/Order/RelationTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ class RelationTest extends \PHPUnit_Framework_TestCase
2121
protected $addressHandlerMock;
2222

2323
/**
24-
* @var \Magento\Sales\Model\Resource\Order\Item|\PHPUnit_Framework_MockObject_MockObject
24+
* @var \Magento\Sales\Api\OrderItemRepositoryInterface|\PHPUnit_Framework_MockObject_MockObject
2525
*/
26-
protected $orderItemResourceMock;
26+
protected $orderItemRepositoryMock;
2727

2828
/**
2929
* @var \Magento\Sales\Model\Resource\Order\Payment|\PHPUnit_Framework_MockObject_MockObject
@@ -71,14 +71,14 @@ public function setUp()
7171
]
7272
)
7373
->getMock();
74-
$this->orderItemResourceMock = $this->getMockBuilder('Magento\Sales\Model\Resource\Order\Item')
74+
$this->orderItemRepositoryMock = $this->getMockBuilder('Magento\Sales\Api\OrderItemRepositoryInterface')
7575
->disableOriginalConstructor()
7676
->setMethods(
7777
[
7878
'save'
7979
]
8080
)
81-
->getMock();
81+
->getMockForAbstractClass();
8282
$this->orderPaymentResourceMock = $this->getMockBuilder('Magento\Sales\Model\Resource\Order\Payment')
8383
->disableOriginalConstructor()
8484
->setMethods(
@@ -154,7 +154,7 @@ public function setUp()
154154
->getMock();
155155
$this->relationProcessor = new \Magento\Sales\Model\Resource\Order\Relation(
156156
$this->addressHandlerMock,
157-
$this->orderItemResourceMock,
157+
$this->orderItemRepositoryMock,
158158
$this->orderPaymentResourceMock,
159159
$this->statusHistoryResource
160160
);
@@ -184,7 +184,7 @@ public function testProcessRelation()
184184
->method('setOrder')
185185
->with($this->orderMock)
186186
->willReturnSelf();
187-
$this->orderItemResourceMock->expects($this->once())
187+
$this->orderItemRepositoryMock->expects($this->once())
188188
->method('save')
189189
->with($this->orderItemMock)
190190
->willReturnSelf();

0 commit comments

Comments
 (0)