Skip to content

Commit d9bf94c

Browse files
author
Olexii Korshenko
committed
MAGETWO-32501: Implement Cart Service interfaces
- fixed unit tests
1 parent 6999807 commit d9bf94c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/WritePluginTest.php renamed to dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/CartManagementPluginTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace Magento\Checkout\Model\Cart\Access;
88

9-
class WritePluginTest extends \PHPUnit_Framework_TestCase
9+
class CartManagementPluginTest extends \PHPUnit_Framework_TestCase
1010
{
1111
/**
1212
* @var \Magento\Checkout\Model\Cart\Access\CartManagementPlugin
@@ -26,7 +26,7 @@ class WritePluginTest extends \PHPUnit_Framework_TestCase
2626
protected function setUp()
2727
{
2828
$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');
3030
$this->model = new CartManagementPlugin($this->userContextMock);
3131
}
3232

@@ -37,7 +37,7 @@ protected function setUp()
3737
public function testBeforeCreateSuccess($userType)
3838
{
3939
$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);
4141
}
4242

4343
public function successTypeDataProvider()
@@ -56,6 +56,6 @@ public function testBeforeCreateDenied()
5656
{
5757
$this->userContextMock->expects($this->once())->method('getUserType')
5858
->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);
6060
}
6161
}

dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/ReadPluginTest.php renamed to dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/CartRepositoryPluginTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace Magento\Checkout\Model\Cart\Access;
88

9-
class ReadPluginTest extends \PHPUnit_Framework_TestCase
9+
class CartRepositoryPluginTest extends \PHPUnit_Framework_TestCase
1010
{
1111
/**
1212
* @var \Magento\Checkout\Model\Cart\Access\CartRepositoryPlugin

0 commit comments

Comments
 (0)