@@ -33,6 +33,9 @@ class AssignCustomerToGuestCartTest extends GraphQlAbstract
33
33
*/
34
34
private $ customerTokenService ;
35
35
36
+ /**
37
+ * @inheritdoc
38
+ */
36
39
protected function setUp (): void
37
40
{
38
41
$ objectManager = Bootstrap::getObjectManager ();
@@ -42,13 +45,15 @@ protected function setUp(): void
42
45
}
43
46
44
47
/**
48
+ * Test for assigning customer to the guest cart
49
+ *
45
50
* @magentoApiDataFixture Magento/Checkout/_files/quote_with_virtual_product_saved.php
46
51
* @magentoApiDataFixture Magento/Customer/_files/customer.php
47
52
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
48
53
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
49
54
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
50
55
*/
51
- public function testAssignCustomerToGuestCart ()
56
+ public function testAssignCustomerToGuestCart (): void
52
57
{
53
58
$ guestQuote = $ this ->getQuoteByReservedOrderId ->execute ('test_order_with_virtual_product_without_address ' );
54
59
$ guestQuoteItem = $ guestQuote ->getAllVisibleItems ()[0 ];
@@ -76,13 +81,15 @@ public function testAssignCustomerToGuestCart()
76
81
}
77
82
78
83
/**
84
+ * Test that customer cart is expired after assigning
85
+ *
79
86
* @magentoApiDataFixture Magento/Checkout/_files/quote_with_virtual_product_saved.php
80
87
* @magentoApiDataFixture Magento/Customer/_files/customer.php
81
88
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
82
89
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
83
90
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
84
91
*/
85
- public function testCustomerCartExpiryAfterAssigning ()
92
+ public function testCustomerCartExpiryAfterAssigning (): void
86
93
{
87
94
$ this ->expectException (\Exception::class);
88
95
$ this ->expectExceptionMessage ('The cart isn \'t active. ' );
@@ -108,9 +115,11 @@ public function testCustomerCartExpiryAfterAssigning()
108
115
}
109
116
110
117
/**
118
+ * Test for assigning customer to non existent cart
119
+ *
111
120
* @magentoApiDataFixture Magento/Customer/_files/customer.php
112
121
*/
113
- public function testAssigningCustomerToNonExistentCart ()
122
+ public function testAssigningCustomerToNonExistentCart (): void
114
123
{
115
124
$ guestQuoteMaskedId = "non_existent_masked_id " ;
116
125
$ this ->expectException (\Exception::class);
@@ -125,12 +134,14 @@ public function testAssigningCustomerToNonExistentCart()
125
134
}
126
135
127
136
/**
137
+ * Test for assigning customer to the customer cart
138
+ *
128
139
* @magentoApiDataFixture Magento/Customer/_files/customer.php
129
140
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
130
141
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
131
142
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
132
143
*/
133
- public function testAssignCustomerToCustomerCart ()
144
+ public function testAssignCustomerToCustomerCart (): void
134
145
{
135
146
$ customerQuote = $ this ->getQuoteByReservedOrderId ->execute ('test_quote ' );
136
147
$ customerQuoteMaskedId = $ this ->quoteIdToMaskedId ->execute ((int )$ customerQuote ->getId ());
@@ -193,6 +204,8 @@ private function getCartQuery(string $maskedId): string
193
204
}
194
205
195
206
/**
207
+ * Retrieve customer authorization headers
208
+ *
196
209
* @param string $username
197
210
* @param string $password
198
211
* @return array
0 commit comments