File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
app/code/Magento/Checkout/Test/Unit/Model/Cart Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -98,10 +98,9 @@ protected function setUp()
98
98
);
99
99
$ this ->addressRepositoryMock = $ this ->createMock (AddressRepositoryInterface::class);
100
100
$ 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
+ );
105
104
$ this ->shippingMethodManagerMock = $ this ->createMock (ShippingMethodManagementInterface::class);
106
105
$ this ->quoteRepositoryMock = $ this ->createMock (CartRepositoryInterface::class);
107
106
$ this ->quoteMock = $ this ->createMock (Quote::class);
@@ -158,7 +157,8 @@ public function testCollect()
158
157
->method ('create ' )
159
158
->willReturn ($ this ->estimateAddressMock );
160
159
$ this ->quoteRepositoryMock ->expects (self ::once ())
161
- ->method ('save ' );
160
+ ->method ('save ' )
161
+ ->with ($ this ->quoteMock );
162
162
163
163
$ this ->model ->collect ($ this ->quoteMock );
164
164
}
You can’t perform that action at this time.
0 commit comments