Skip to content

Commit

Permalink
graphQl-987: [Test coverage] Cover exceptions in Magento\QuoteGraphQl…
Browse files Browse the repository at this point in the history
…\Model\Resolver\SetPaymentAndPlaceOrder
  • Loading branch information
kisroman committed Oct 8, 2019
1 parent afae879 commit d3850aa
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public function testSetPaymentOnCartWithSimpleProduct()
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/set_simple_product_out_of_stock.php
*
* @dataProvider dataProviderSetPaymentOnCartWithException
* @param string $input
Expand Down Expand Up @@ -141,6 +142,13 @@ public function dataProviderSetPaymentOnCartWithException(): array
'cart_id: "cart_id_value"',
'Required parameter "code" for "payment_method" is missing.',
],
'place_order_with_out_of_stock_products' => [
'cart_id: "cart_id_value"
payment_method: {
code: "' . Checkmo::PAYMENT_METHOD_CHECKMO_CODE . '"
}',
'Unable to place order: Some of the products are out of stock.',
],
];
}

Expand Down

0 comments on commit d3850aa

Please sign in to comment.