6
6
7
7
namespace Magento \Checkout \Model \Cart \Access ;
8
8
9
- class WritePluginTest extends \PHPUnit_Framework_TestCase
9
+ class CartManagementPluginTest extends \PHPUnit_Framework_TestCase
10
10
{
11
11
/**
12
12
* @var \Magento\Checkout\Model\Cart\Access\CartManagementPlugin
@@ -26,7 +26,7 @@ class WritePluginTest extends \PHPUnit_Framework_TestCase
26
26
protected function setUp ()
27
27
{
28
28
$ this ->userContextMock = $ this ->getMock ('Magento\Authorization\Model\UserContextInterface ' );
29
- $ this ->subjectMock = $ this ->getMock ('\Magento\Checkout\Service\V1\Cart\WriteServiceInterface ' );
29
+ $ this ->subjectMock = $ this ->getMock ('\Magento\Quote\Api\CartManagementInterface ' );
30
30
$ this ->model = new CartManagementPlugin ($ this ->userContextMock );
31
31
}
32
32
@@ -37,7 +37,7 @@ protected function setUp()
37
37
public function testBeforeCreateSuccess ($ userType )
38
38
{
39
39
$ this ->userContextMock ->expects ($ this ->once ())->method ('getUserType ' )->will ($ this ->returnValue ($ userType ));
40
- $ this ->model ->beforeAssignCustomer ($ this ->subjectMock , 1 , 1 );
40
+ $ this ->model ->beforeAssignCustomer ($ this ->subjectMock , 1 , 1 , 1 );
41
41
}
42
42
43
43
public function successTypeDataProvider ()
@@ -56,6 +56,6 @@ public function testBeforeCreateDenied()
56
56
{
57
57
$ this ->userContextMock ->expects ($ this ->once ())->method ('getUserType ' )
58
58
->will ($ this ->returnValue (\Magento \Authorization \Model \UserContextInterface::USER_TYPE_CUSTOMER ));
59
- $ this ->model ->beforeAssignCustomer ($ this ->subjectMock , 1 , 1 );
59
+ $ this ->model ->beforeAssignCustomer ($ this ->subjectMock , 1 , 1 , 1 );
60
60
}
61
61
}
0 commit comments