@@ -135,35 +135,6 @@ public function testGuestCartExpiryAfterMerge()
135
135
);
136
136
}
137
137
138
- /**
139
- * @magentoApiDataFixture Magento/Customer/_files/customer.php
140
- * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
141
- * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
142
- * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
143
- * @magentoApiDataFixture Magento/GraphQl/Quote/_files/make_cart_inactive.php
144
- * @expectedException \Exception
145
- * @expectedExceptionMessage Current user does not have an active cart.
146
- */
147
- public function testMergeTwoCustomerCarts ()
148
- {
149
- $ firstQuote = $ this ->quoteFactory ->create ();
150
- $ this ->quoteResource ->load ($ firstQuote , 'test_quote ' , 'reserved_order_id ' );
151
- $ firstMaskedId = $ this ->quoteIdToMaskedId ->execute ((int )$ firstQuote ->getId ());
152
-
153
- $ createCartResponse = $ this ->graphQlMutation (
154
- $ this ->getCreateEmptyCartMutation (),
155
- [],
156
- '' ,
157
- $ this ->getHeaderMap ()
158
- );
159
- self ::assertArrayHasKey ('createEmptyCart ' , $ createCartResponse );
160
- $ secondMaskedId = $ createCartResponse ['createEmptyCart ' ];
161
- $ this ->addSimpleProductToCart ($ secondMaskedId , $ this ->getHeaderMap ());
162
-
163
- $ query = $ this ->getCartMergeMutation ($ firstMaskedId , $ secondMaskedId );
164
- $ this ->graphQlMutation ($ query , [], '' , $ this ->getHeaderMap ());
165
- }
166
-
167
138
/**
168
139
* @magentoApiDataFixture Magento/Customer/_files/two_customers.php
169
140
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
@@ -172,12 +143,12 @@ public function testMergeTwoCustomerCarts()
172
143
* @expectedException \Exception
173
144
* @expectedExceptionMessage The current user cannot perform operations on cart
174
145
*/
175
- public function testMergeOtherCustomerCart ()
146
+ public function testMergeTwoCustomerCarts ()
176
147
{
177
148
$ firstQuote = $ this ->quoteFactory ->create ();
178
149
$ this ->quoteResource ->load ($ firstQuote , 'test_quote ' , 'reserved_order_id ' );
179
-
180
150
$ firstMaskedId = $ this ->quoteIdToMaskedId ->execute ((int )$ firstQuote ->getId ());
151
+
181
152
$ createCartResponse = $ this ->graphQlMutation (
182
153
$ this ->getCreateEmptyCartMutation (),
183
154
[],
@@ -186,7 +157,7 @@ public function testMergeOtherCustomerCart()
186
157
);
187
158
self ::assertArrayHasKey ('createEmptyCart ' , $ createCartResponse );
188
159
$ secondMaskedId = $ createCartResponse ['createEmptyCart ' ];
189
- $ this ->addSimpleProductToCart ($ secondMaskedId , $ this ->getHeaderMap (' customer_two@example.com ' ));
160
+ $ this ->addSimpleProductToCart ($ secondMaskedId , $ this ->getHeaderMap ());
190
161
191
162
$ query = $ this ->getCartMergeMutation ($ firstMaskedId , $ secondMaskedId );
192
163
$ this ->graphQlMutation ($ query , [], '' , $ this ->getHeaderMap ());
0 commit comments