From 40061f8180f23213802d68d96a03cf6740d72928 Mon Sep 17 00:00:00 2001 From: AleksLi Date: Tue, 19 Mar 2019 19:40:04 +0100 Subject: [PATCH] GraphQL-423: Replaced as integer parameter --- .../Customer/SetShippingMethodsOnCartTest.php | 38 ++++++++----------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetShippingMethodsOnCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetShippingMethodsOnCartTest.php index ec54ec43f4cee..aeb020dba8046 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetShippingMethodsOnCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetShippingMethodsOnCartTest.php @@ -77,7 +77,6 @@ protected function setUp() /** * @magentoApiDataFixture Magento/Checkout/_files/quote_with_virtual_product_and_address.php - * @magentoApiDataFixture Magento/Checkout/_files/enable_all_shipping_methods.php * @throws \Exception */ public function testShippingMethodWithVirtualProduct() @@ -105,7 +104,7 @@ public function testShippingMethodWithVirtualProduct() $maskedQuoteId, 'flatrate', 'flatrate_flatrate', - $shippingAddress->getId() + (int)$shippingAddress->getId() ); $this->graphQlQuery($mutation, [], '', $this->getHeaderMap()); @@ -113,7 +112,6 @@ public function testShippingMethodWithVirtualProduct() /** * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php - * @magentoApiDataFixture Magento/Checkout/_files/enable_all_shipping_methods.php * @throws \Exception */ public function testShippingMethodWithSimpleProduct() @@ -146,7 +144,7 @@ public function testShippingMethodWithSimpleProduct() $maskedQuoteId, 'flatrate', 'flatrate', - $shippingAddress->getId() + (int)$shippingAddress->getId() ); $this->graphQlQuery($mutation, [], '', $this->getHeaderMap()); @@ -155,7 +153,6 @@ public function testShippingMethodWithSimpleProduct() /** * @magentoApiDataFixture Magento/Customer/_files/customer.php * @magentoApiDataFixture Magento/Checkout/_files/quote_with_simple_product_saved.php - * @magentoApiDataFixture Magento/Checkout/_files/enable_all_shipping_methods.php * @throws \Exception */ public function testShippingMethodWithSimpleProductWithoutAddress() @@ -183,7 +180,7 @@ public function testShippingMethodWithSimpleProductWithoutAddress() $maskedQuoteId, 'flatrate', 'flatrate', - $shippingAddress->getId() + (int)$shippingAddress->getId() ); self::expectExceptionMessage( @@ -204,7 +201,7 @@ public function testSetShippingMethodWithMissedRequiredParameters() $maskedQuoteId, '', '', - '1' + 1 ); self::expectExceptionMessage( @@ -215,7 +212,6 @@ public function testSetShippingMethodWithMissedRequiredParameters() /** * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php - * @magentoApiDataFixture Magento/Checkout/_files/enable_all_shipping_methods.php * @throws \Exception */ public function testSetNonExistentShippingMethod() @@ -248,7 +244,7 @@ public function testSetNonExistentShippingMethod() $maskedQuoteId, 'non-existed-method-code', 'non-existed-carrier-code', - $shippingAddress->getId() + (int)$shippingAddress->getId() ); self::expectExceptionMessage( @@ -261,7 +257,6 @@ public function testSetNonExistentShippingMethod() /** * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php * @magentoApiDataFixture Magento/Customer/_files/customer_two_addresses.php - * @magentoApiDataFixture Magento/Checkout/_files/enable_all_shipping_methods.php * @throws \Exception */ public function testSetShippingMethodIfAddressIsNotBelongToCart() @@ -294,7 +289,7 @@ public function testSetShippingMethodIfAddressIsNotBelongToCart() $maskedQuoteId, 'flatrate', 'flatrate', - '2' + 2 ); self::expectExceptionMessage( @@ -317,7 +312,7 @@ public function testSetShippingMethodToNonExistentCart() $maskedQuoteId, 'flatrate', 'flatrate', - '80900' + 80900 ); $this->graphQlQuery($mutation, [], '', $this->getHeaderMap()); @@ -340,7 +335,7 @@ public function testSetShippingMethodToGuestCart() $maskedQuoteId, 'flatrate', 'flatrate', - $quote->getShippingAddress()->getId() + (int)$quote->getShippingAddress()->getId() ); $this->graphQlQuery($mutation); @@ -363,7 +358,7 @@ public function testSetShippingMethodToAnotherCustomerCart() $maskedQuoteId, 'flatrate', 'flatrate', - $quote->getShippingAddress()->getId() + (int)$quote->getShippingAddress()->getId() ); self::expectExceptionMessage( @@ -384,7 +379,7 @@ public function testSetShippingMethodToNonExistentCartAddress() $maskedQuoteId, 'flatrate', 'flatrate', - '16800' + 16800 ); self::expectExceptionMessage( 'Could not find a cart address with ID "16800"' @@ -395,7 +390,6 @@ public function testSetShippingMethodToNonExistentCartAddress() /** * @magentoApiDataFixture Magento/Sales/_files/guest_quote_with_addresses.php - * @magentoApiDataFixture Magento/Checkout/_files/enable_all_shipping_methods.php * @throws \Exception */ public function testSetShippingMethodToGuestCartAddress() @@ -410,7 +404,7 @@ public function testSetShippingMethodToGuestCartAddress() $maskedQuoteId, 'flatrate', 'flatrate', - $quote->getShippingAddress()->getId() + (int)$quote->getShippingAddress()->getId() ); $this->graphQlQuery($mutation); @@ -419,7 +413,6 @@ public function testSetShippingMethodToGuestCartAddress() /** * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php * @magentoApiDataFixture Magento/Checkout/_files/quote_with_virtual_product_and_address.php - * @magentoApiDataFixture Magento/Checkout/_files/enable_all_shipping_methods.php * @throws \Exception */ public function testSetShippingMethodToAnotherCustomerCartAddress() @@ -434,7 +427,7 @@ public function testSetShippingMethodToAnotherCustomerCartAddress() $maskedQuoteId, 'flatrate', 'flatrate', - $quote->getShippingAddress()->getId() + (int)$quote->getShippingAddress()->getId() ); self::expectExceptionMessage( @@ -445,7 +438,6 @@ public function testSetShippingMethodToAnotherCustomerCartAddress() /** * @magentoApiDataFixture Magento/Checkout/_files/quote_with_shipping_method.php - * @magentoApiDataFixture Magento/Checkout/_files/enable_all_shipping_methods.php * @throws \Exception */ public function testSetMultipleShippingMethods() @@ -456,7 +448,7 @@ public function testSetMultipleShippingMethods() $quote = $this->quoteFactory->create(); $this->quoteResource->load($quote, 'test_order_1', 'reserved_order_id'); - $shippingAddressId = $quote->getShippingAddress()->getId(); + $shippingAddressId = (int)$quote->getShippingAddress()->getId(); $mutation = <<