Skip to content

Commit 9d988a1

Browse files
committed
MAGETWO-36377: Magento\Quote\Api\GuestCartRepositoryInterface
- replaced concrete usage with interface
1 parent 716c937 commit 9d988a1

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

app/code/Magento/Quote/Model/GuestCart/GuestCartRepository.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
* Copyright © 2015 Magento. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
76
namespace Magento\Quote\Model\GuestCart;
87

98
use Magento\Quote\Api\GuestCartRepositoryInterface;
109
use Magento\Quote\Model\QuoteIdMask;
11-
use Magento\Quote\Model\QuoteRepository;
10+
use Magento\Quote\Api\CartRepositoryInterface;
1211
use Magento\Quote\Model\QuoteIdMaskFactory;
1312

1413
/**
@@ -22,18 +21,18 @@ class GuestCartRepository implements GuestCartRepositoryInterface
2221
protected $quoteIdMaskFactory;
2322

2423
/**
25-
* @var QuoteRepository
24+
* @var CartRepositoryInterface
2625
*/
2726
protected $quoteRepository;
2827

2928
/**
3029
* Initialize dependencies.
3130
*
32-
* @param QuoteRepository $quoteRepository
31+
* @param CartRepositoryInterface $quoteRepository
3332
* @param QuoteIdMaskFactory $quoteIdMaskFactory
3433
*/
3534
public function __construct(
36-
QuoteRepository $quoteRepository,
35+
CartRepositoryInterface $quoteRepository,
3736
QuoteIdMaskFactory $quoteIdMaskFactory
3837
) {
3938
$this->quoteIdMaskFactory = $quoteIdMaskFactory;

app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartRepositoryTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* Copyright © 2015 Magento. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7-
87
namespace Magento\Quote\Test\Unit\Model\GuestCart;
98

109
class GuestCartRepositoryTest extends \PHPUnit_Framework_TestCase
@@ -47,7 +46,7 @@ class GuestCartRepositoryTest extends \PHPUnit_Framework_TestCase
4746
protected function setUp()
4847
{
4948
$objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
50-
$this->quoteRepositoryMock = $this->getMock( 'Magento\Quote\Model\QuoteRepository', [], [], '', false);
49+
$this->quoteRepositoryMock = $this->getMock( 'Magento\Quote\Api\CartRepositoryInterface', [], [], '', false);
5150
$this->quoteMock = $this->getMock('Magento\Quote\Model\Quote', [], [], '', false);
5251

5352
$this->maskedCartId = 'f216207248d65c789b17be8545e0aa73';

0 commit comments

Comments
 (0)