@@ -47,11 +47,11 @@ protected function setUp()
47
47
/**
48
48
* @magentoApiDataFixture Magento/Checkout/_files/quote_with_simple_product_saved.php
49
49
*/
50
- public function testGetPaymentMethodsFromGuestCart ()
50
+ public function testGetCartWithPaymentMethods ()
51
51
{
52
52
$ maskedQuoteId = $ this ->getMaskedQuoteIdByReservedOrderId ('test_order_with_simple_product_without_address ' );
53
- $ query = $ this ->getCartAvailablePaymentMethodsQuery ($ maskedQuoteId );
54
- $ response = $ this ->graphQlQuery ($ query );
53
+ $ query = $ this ->getQuery ($ maskedQuoteId );
54
+ $ response = $ this ->graphQlQuery ($ query );
55
55
56
56
self ::assertArrayHasKey ('cart ' , $ response );
57
57
@@ -73,10 +73,10 @@ public function testGetPaymentMethodsFromGuestCart()
73
73
/**
74
74
* @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php
75
75
*/
76
- public function testGetPaymentMethodsFromAnotherCustomerCart ()
76
+ public function testGetPaymentMethodsFromCustomerCart ()
77
77
{
78
78
$ maskedQuoteId = $ this ->getMaskedQuoteIdByReservedOrderId ('test_order_1 ' );
79
- $ query = $ this ->getCartAvailablePaymentMethodsQuery ($ maskedQuoteId );
79
+ $ query = $ this ->getQuery ($ maskedQuoteId );
80
80
81
81
$ this ->expectExceptionMessage (
82
82
"The current user cannot perform operations on cart \"$ maskedQuoteId \""
@@ -91,8 +91,8 @@ public function testGetPaymentMethodsFromAnotherCustomerCart()
91
91
public function testGetPaymentMethodsIfPaymentsAreNotSet ()
92
92
{
93
93
$ maskedQuoteId = $ this ->getMaskedQuoteIdByReservedOrderId ('test_order_with_simple_product_without_address ' );
94
- $ query = $ this ->getCartAvailablePaymentMethodsQuery ($ maskedQuoteId );
95
- $ response = $ this ->graphQlQuery ($ query );
94
+ $ query = $ this ->getQuery ($ maskedQuoteId );
95
+ $ response = $ this ->graphQlQuery ($ query );
96
96
97
97
self ::assertEquals (0 , count ($ response ['cart ' ]['available_payment_methods ' ]));
98
98
}
@@ -104,17 +104,17 @@ public function testGetPaymentMethodsIfPaymentsAreNotSet()
104
104
public function testGetPaymentMethodsOfNonExistentCart ()
105
105
{
106
106
$ maskedQuoteId = 'non_existent_masked_id ' ;
107
- $ query = $ this ->getCartAvailablePaymentMethodsQuery ($ maskedQuoteId );
107
+ $ query = $ this ->getQuery ($ maskedQuoteId );
108
108
$ this ->graphQlQuery ($ query );
109
109
}
110
110
111
111
/**
112
112
* @param string $maskedQuoteId
113
113
* @return string
114
114
*/
115
- private function getCartAvailablePaymentMethodsQuery (
115
+ private function getQuery (
116
116
string $ maskedQuoteId
117
- ) : string {
117
+ ): string {
118
118
return <<<QUERY
119
119
{
120
120
cart(cart_id: " $ maskedQuoteId") {
0 commit comments