Skip to content
Snippets Groups Projects
Commit 3c759b5c authored by Yuxing Zheng's avatar Yuxing Zheng
Browse files

MAGETWO-36378: Magento\Quote\Api\GuestCartManagement

 - Remove $quoteRepository from the parameters of GuestCartManagement::__construct
 - Update unit test accordingly
parent 665ff192
No related merge requests found
......@@ -25,11 +25,6 @@ class GuestCartManagement implements GuestCartManagementInterface
*/
protected $quoteManagement;
/**
* @var QuoteRepository
*/
protected $quoteRepository;
/**
* @var QuoteIdMaskFactory
*/
......@@ -39,17 +34,14 @@ class GuestCartManagement implements GuestCartManagementInterface
* Initialize dependencies.
*
* @param CartManagementInterface $quoteManagement
* @param QuoteRepository $quoteRepository
* @param QuoteIdMaskFactory $quoteIdMaskFactory
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
CartManagementInterface $quoteManagement,
QuoteRepository $quoteRepository,
QuoteIdMaskFactory $quoteIdMaskFactory
) {
$this->quoteManagement = $quoteManagement;
$this->quoteRepository = $quoteRepository;
$this->quoteIdMaskFactory = $quoteIdMaskFactory;
}
......
......@@ -47,7 +47,6 @@ class GuestCartManagementTest extends \PHPUnit_Framework_TestCase
true,
[]
);
$this->quoteRepositoryMock = $this->getMock('Magento\Quote\Model\QuoteRepository', [], [], '', false);
$this->quoteIdMaskFactoryMock = $this->getMock(
'Magento\Quote\Model\QuoteIdMaskFactory',
['create'],
......@@ -67,7 +66,6 @@ class GuestCartManagementTest extends \PHPUnit_Framework_TestCase
'Magento\Quote\Model\GuestCart\GuestCartManagement',
[
'quoteManagement' => $this->quoteManagementMock,
'quoteRepository' => $this->quoteRepositoryMock,
'quoteIdMaskFactory' => $this->quoteIdMaskFactoryMock
]
);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment