Skip to content

Commit 1d4c21b

Browse files
committed
Applying CR recommendations
1 parent 6b7b733 commit 1d4c21b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

app/code/Magento/Checkout/Test/Unit/Model/Cart/CollectQuoteTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,9 @@ protected function setUp()
9898
);
9999
$this->addressRepositoryMock = $this->createMock(AddressRepositoryInterface::class);
100100
$this->estimateAddressMock = $this->createMock(EstimateAddressInterface::class);
101-
$this->estimateAddressFactoryMock = $this->getMockBuilder(EstimateAddressInterfaceFactory::class)
102-
->setMethods(['create'])
103-
->disableOriginalConstructor()
104-
->getMock();
101+
$this->estimateAddressFactoryMock = $this->createPartialMock(EstimateAddressInterfaceFactory::class,
102+
['create']
103+
);
105104
$this->shippingMethodManagerMock = $this->createMock(ShippingMethodManagementInterface::class);
106105
$this->quoteRepositoryMock = $this->createMock(CartRepositoryInterface::class);
107106
$this->quoteMock = $this->createMock(Quote::class);
@@ -158,7 +157,8 @@ public function testCollect()
158157
->method('create')
159158
->willReturn($this->estimateAddressMock);
160159
$this->quoteRepositoryMock->expects(self::once())
161-
->method('save');
160+
->method('save')
161+
->with($this->quoteMock);
162162

163163
$this->model->collect($this->quoteMock);
164164
}

0 commit comments

Comments
 (0)