@@ -155,6 +155,40 @@ public function testRemoveItemFromAnotherCustomerCart()
155
155
$ this ->graphQlMutation ($ query , [], '' , $ this ->getHeaderMap ('customer2@search.example.com ' ));
156
156
}
157
157
158
+ /**
159
+ * @magentoApiDataFixture Magento/Customer/_files/customer.php
160
+ * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
161
+ * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
162
+ * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
163
+ */
164
+ public function testRemoveItemWithEmptyCartId ()
165
+ {
166
+ $ cartId = "" ;
167
+ $ cartItemId = $ this ->getQuoteItemIdByReservedQuoteIdAndSku ->execute ('test_quote ' , 'simple_product ' );
168
+
169
+ $ this ->expectExceptionMessage ("Required parameter \"cart_id \" is missing. " );
170
+
171
+ $ query = $ this ->getQuery ($ cartId , $ cartItemId );
172
+ $ this ->graphQlMutation ($ query , [], '' , $ this ->getHeaderMap ());
173
+ }
174
+
175
+ /**
176
+ * @magentoApiDataFixture Magento/Customer/_files/customer.php
177
+ * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
178
+ * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
179
+ * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
180
+ */
181
+ public function testRemoveItemWithZeroCartItemId ()
182
+ {
183
+ $ cartId = $ this ->getMaskedQuoteIdByReservedOrderId ->execute ('test_quote ' );
184
+ $ cartItemId = 0 ;
185
+
186
+ $ this ->expectExceptionMessage ("Required parameter \"cart_item_id \" is missing. " );
187
+
188
+ $ query = $ this ->getQuery ($ cartId , $ cartItemId );
189
+ $ this ->graphQlMutation ($ query , [], '' , $ this ->getHeaderMap ());
190
+ }
191
+
158
192
/**
159
193
* @param string $maskedQuoteId
160
194
* @param int $itemId
0 commit comments