Skip to content

Commit 385a635

Browse files
committed
MAGETWO-36379: Magento\Quote\Api\GuestCouponManagement
- replaced concrete usage with interface
1 parent 9d988a1 commit 385a635

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

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

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

109
use Magento\Quote\Api\GuestCouponManagementInterface;
11-
use Magento\Quote\Model\CouponManagement;
10+
use Magento\Quote\Api\CouponManagementInterface;
1211
use Magento\Quote\Model\QuoteIdMask;
1312
use Magento\Quote\Model\QuoteIdMaskFactory;
1413

@@ -23,18 +22,18 @@ class GuestCouponManagement implements GuestCouponManagementInterface
2322
private $quoteIdMaskFactory;
2423

2524
/**
26-
* @var CouponManagement
25+
* @var CouponManagementInterface
2726
*/
2827
private $couponManagement;
2928

3029
/**
3130
* Constructs a coupon read service object.
3231
*
33-
* @param CouponManagement $couponManagement
32+
* @param CouponManagementInterface $couponManagement
3433
* @param QuoteIdMaskFactory $quoteIdMaskFactory
3534
*/
3635
public function __construct(
37-
CouponManagement $couponManagement,
36+
CouponManagementInterface $couponManagement,
3837
QuoteIdMaskFactory $quoteIdMaskFactory
3938
) {
4039
$this->quoteIdMaskFactory = $quoteIdMaskFactory;

app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCouponManagementTest.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 GuestCouponManagementTest extends \PHPUnit_Framework_TestCase
@@ -47,7 +46,7 @@ class GuestCouponManagementTest extends \PHPUnit_Framework_TestCase
4746
protected function setUp()
4847
{
4948
$objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
50-
$this->couponManagementMock = $this->getMock( 'Magento\Quote\Model\CouponManagement', [], [], '', false);
49+
$this->couponManagementMock = $this->getMock( 'Magento\Quote\Api\CouponManagementInterface', [], [], '', false);
5150

5251
$this->couponCode = 'test_coupon_code';
5352
$this->maskedCartId = 'f216207248d65c789b17be8545e0aa73';

0 commit comments

Comments
 (0)