Skip to content

Commit c7b6d57

Browse files
author
Prabhu Ram
committed
Merge branch 'MC-18402' of github.com:magento-honey-badgers/magento2ce into MC-18402
2 parents c120129 + be238ea commit c7b6d57

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/CartPromotionsTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public function testCartPromotionsMultipleCartRules()
199199
* @magentoApiDataFixture Magento/GraphQl/Tax/_files/tax_calculation_price_and_cart_display_settings.php
200200
* @magentoApiDataFixture Magento/SalesRule/_files/rules_category.php
201201
*/
202-
public function testCartPromotionsSingleCartRulesWithTaxes()
202+
public function testCartPromotionsCartRulesWithTaxes()
203203
{
204204
$objectManager = Bootstrap::getObjectManager();
205205
/** @var ProductRepositoryInterface $productRepository */
@@ -303,7 +303,7 @@ public function testCartPromotionsWithCoupons()
303303
$couponCode = '2?ds5!2d';
304304
$cartId = $this->createEmptyCart();
305305
$this->addMultipleSimpleProductsToCart($cartId, $qty, $skus[0], $skus[1]);
306-
$this->applyCouponToCart($cartId, $couponCode);
306+
$this->applyCouponsToCart($cartId, $couponCode);
307307
$query = $this->getCartItemPricesQuery($cartId);
308308
$response = $this->graphQlMutation($query);
309309
$this->assertCount(2, $response['cart']['items']);
@@ -391,13 +391,13 @@ public function testCartPromotionsWithNoRuleLabels()
391391
* @param string $cartId
392392
* @param string $couponCode
393393
*/
394-
private function applyCouponToCart(string $cartId, string $couponCode)
394+
private function applyCouponsToCart(string $cartId, string $couponCode)
395395
{
396396
$query = <<<QUERY
397397
mutation {
398398
applyCouponToCart(input: {cart_id: "$cartId", coupon_code: "$couponCode"}) {
399399
cart {
400-
applied_coupon {
400+
applied_coupons {
401401
code
402402
}
403403
}
@@ -407,7 +407,7 @@ private function applyCouponToCart(string $cartId, string $couponCode)
407407
$response = $this->graphQlMutation($query);
408408

409409
self::assertArrayHasKey('applyCouponToCart', $response);
410-
self::assertEquals($couponCode, $response['applyCouponToCart']['cart']['applied_coupon']['code']);
410+
self::assertEquals($couponCode, $response['applyCouponToCart']['cart']['applied_coupons'][0]['code']);
411411
}
412412

413413
/**

0 commit comments

Comments
 (0)