Skip to content

Commit 9ced6e0

Browse files
32615: add method's descriptions
1 parent 36971ef commit 9ced6e0

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

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

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ class AssignCustomerToGuestCartTest extends GraphQlAbstract
3333
*/
3434
private $customerTokenService;
3535

36+
/**
37+
* @inheritdoc
38+
*/
3639
protected function setUp(): void
3740
{
3841
$objectManager = Bootstrap::getObjectManager();
@@ -42,13 +45,15 @@ protected function setUp(): void
4245
}
4346

4447
/**
48+
* Test for assigning customer to the guest cart
49+
*
4550
* @magentoApiDataFixture Magento/Checkout/_files/quote_with_virtual_product_saved.php
4651
* @magentoApiDataFixture Magento/Customer/_files/customer.php
4752
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
4853
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
4954
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
5055
*/
51-
public function testAssignCustomerToGuestCart()
56+
public function testAssignCustomerToGuestCart(): void
5257
{
5358
$guestQuote = $this->getQuoteByReservedOrderId->execute('test_order_with_virtual_product_without_address');
5459
$guestQuoteItem = $guestQuote->getAllVisibleItems()[0];
@@ -76,13 +81,15 @@ public function testAssignCustomerToGuestCart()
7681
}
7782

7883
/**
84+
* Test that customer cart is expired after assigning
85+
*
7986
* @magentoApiDataFixture Magento/Checkout/_files/quote_with_virtual_product_saved.php
8087
* @magentoApiDataFixture Magento/Customer/_files/customer.php
8188
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
8289
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
8390
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
8491
*/
85-
public function testCustomerCartExpiryAfterAssigning()
92+
public function testCustomerCartExpiryAfterAssigning(): void
8693
{
8794
$this->expectException(\Exception::class);
8895
$this->expectExceptionMessage('The cart isn\'t active.');
@@ -108,9 +115,11 @@ public function testCustomerCartExpiryAfterAssigning()
108115
}
109116

110117
/**
118+
* Test for assigning customer to non existent cart
119+
*
111120
* @magentoApiDataFixture Magento/Customer/_files/customer.php
112121
*/
113-
public function testAssigningCustomerToNonExistentCart()
122+
public function testAssigningCustomerToNonExistentCart(): void
114123
{
115124
$guestQuoteMaskedId = "non_existent_masked_id";
116125
$this->expectException(\Exception::class);
@@ -125,12 +134,14 @@ public function testAssigningCustomerToNonExistentCart()
125134
}
126135

127136
/**
137+
* Test for assigning customer to the customer cart
138+
*
128139
* @magentoApiDataFixture Magento/Customer/_files/customer.php
129140
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
130141
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
131142
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
132143
*/
133-
public function testAssignCustomerToCustomerCart()
144+
public function testAssignCustomerToCustomerCart(): void
134145
{
135146
$customerQuote = $this->getQuoteByReservedOrderId->execute('test_quote');
136147
$customerQuoteMaskedId = $this->quoteIdToMaskedId->execute((int)$customerQuote->getId());
@@ -193,6 +204,8 @@ private function getCartQuery(string $maskedId): string
193204
}
194205

195206
/**
207+
* Retrieve customer authorization headers
208+
*
196209
* @param string $username
197210
* @param string $password
198211
* @return array

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AssignCustomerToGuestCartTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,15 @@ class AssignCustomerToGuestCartTest extends GraphQlAbstract
2121
* @var QuoteIdToMaskedQuoteIdInterface
2222
*/
2323
private $quoteIdToMaskedId;
24+
2425
/**
2526
* @var GetQuoteByReservedOrderId
2627
*/
2728
private $getQuoteByReservedOrderId;
2829

30+
/**
31+
* @inheritdoc
32+
*/
2933
protected function setUp(): void
3034
{
3135
$objectManager = Bootstrap::getObjectManager();
@@ -34,10 +38,12 @@ protected function setUp(): void
3438
}
3539

3640
/**
41+
* Test for assigning guest to the guest cart
42+
*
3743
* @magentoApiDataFixture Magento/Checkout/_files/simple_product.php
3844
* @magentoApiDataFixture Magento/Checkout/_files/quote_with_simple_product_saved.php
3945
*/
40-
public function testAssignCustomerToGuestCartForGuest()
46+
public function testAssignCustomerToGuestCartForGuest(): void
4147
{
4248
$this->expectException(\Exception::class);
4349
$this->expectExceptionMessage('The current customer isn\'t authorized.');

0 commit comments

Comments
 (0)