Skip to content

Commit c09fc90

Browse files
committed
MAGETWO-69856: [Backport] - [Github] Wrong error message in cart after entering invalid discount code #7230 - for 2.1
1 parent 5053207 commit c09fc90

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

app/code/Magento/Checkout/Controller/Cart/CouponPost.php

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
/**
99
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
10+
*
11+
* Coupon Post controller.
1012
*/
1113
class CouponPost extends \Magento\Checkout\Controller\Cart
1214
{

app/code/Magento/Checkout/Test/Unit/Controller/Cart/CouponPostTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
use Magento\Checkout\Controller\Cart\Index;
99

1010
/**
11-
* Class IndexTest
12-
*
1311
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
12+
*
13+
* Test for \Magento\Checkout\Controller\Cart\CouponPost
1414
*/
1515
class CouponPostTest extends \PHPUnit_Framework_TestCase
1616
{

dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/configurable_attribute.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
/** @var $attribute \Magento\Catalog\Model\ResourceModel\Eav\Attribute */
2020
$attribute = Bootstrap::getObjectManager()->create(
21-
'Magento\Catalog\Model\ResourceModel\Eav\Attribute'
21+
\Magento\Catalog\Model\ResourceModel\Eav\Attribute::class
2222
);
2323

2424
/** @var AttributeRepositoryInterface $attributeRepository */

dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/quote_with_configurable_product_last_variation.php

+4-6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
require __DIR__ . '/configurable_products.php';
1010

11+
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
12+
1113
/** @var \Magento\Quote\Model\Quote $quote */
1214
$quote = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Quote\Model\Quote::class);
1315

@@ -55,14 +57,10 @@
5557
);
5658

5759
/** @var \Magento\Quote\Model\QuoteRepository $quoteRepository */
58-
$quoteRepository = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
59-
\Magento\Quote\Model\QuoteRepository::class
60-
);
60+
$quoteRepository = $objectManager->create(\Magento\Quote\Model\QuoteRepository::class);
6161
$quote->collectTotals();
6262
$quoteRepository->save($quote);
6363

6464
/** @var \Magento\Checkout\Model\Session $session */
65-
$session = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
66-
\Magento\Checkout\Model\Session::class
67-
);
65+
$session = $objectManager->create(\Magento\Checkout\Model\Session::class);
6866
$session->setQuoteId($quote->getId());

0 commit comments

Comments
 (0)