Skip to content

Commit d3850aa

Browse files
committed
graphQl-987: [Test coverage] Cover exceptions in Magento\QuoteGraphQl\Model\Resolver\SetPaymentAndPlaceOrder
1 parent afae879 commit d3850aa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ public function testSetPaymentOnCartWithSimpleProduct()
9696
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php
9797
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php
9898
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php
99+
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/set_simple_product_out_of_stock.php
99100
*
100101
* @dataProvider dataProviderSetPaymentOnCartWithException
101102
* @param string $input
@@ -141,6 +142,13 @@ public function dataProviderSetPaymentOnCartWithException(): array
141142
'cart_id: "cart_id_value"',
142143
'Required parameter "code" for "payment_method" is missing.',
143144
],
145+
'place_order_with_out_of_stock_products' => [
146+
'cart_id: "cart_id_value"
147+
payment_method: {
148+
code: "' . Checkmo::PAYMENT_METHOD_CHECKMO_CODE . '"
149+
}',
150+
'Unable to place order: Some of the products are out of stock.',
151+
],
144152
];
145153
}
146154

0 commit comments

Comments
 (0)