@@ -52,7 +52,7 @@ public function testGetSubscriptionStatusTest()
5252 }
5353}
5454QUERY ;
55- $ response = $ this ->graphQlQuery ($ query , [], '' , $ this ->getCustomerAuthHeaders ($ currentEmail , $ currentPassword ));
55+ $ response = $ this ->graphQlQuery ($ query , [], '' , $ this ->getHeaderMap ($ currentEmail , $ currentPassword ));
5656 $ this ->assertFalse ($ response ['customer ' ]['is_subscribed ' ]);
5757 }
5858
@@ -75,7 +75,7 @@ public function testGetSubscriptionStatusIfUserIsNotAuthorizedTest()
7575 /**
7676 * @magentoApiDataFixture Magento/Customer/_files/customer.php
7777 */
78- public function testChangeSubscriptionStatusTest ()
78+ public function testSubscribeCustomer ()
7979 {
8080 $ currentEmail = 'customer@example.com ' ;
8181 $ currentPassword = 'password ' ;
@@ -97,7 +97,7 @@ public function testChangeSubscriptionStatusTest()
9797 $ query ,
9898 [],
9999 '' ,
100- $ this ->getCustomerAuthHeaders ($ currentEmail , $ currentPassword )
100+ $ this ->getHeaderMap ($ currentEmail , $ currentPassword )
101101 );
102102 $ this ->assertTrue ($ response ['updateCustomer ' ]['customer ' ]['is_subscribed ' ]);
103103 }
@@ -145,7 +145,7 @@ public function testUnsubscribeCustomer()
145145 }
146146}
147147QUERY ;
148- $ response = $ this ->graphQlMutation ($ query , [], '' , $ this ->getCustomerAuthHeaders ($ currentEmail , $ currentPassword ));
148+ $ response = $ this ->graphQlMutation ($ query , [], '' , $ this ->getHeaderMap ($ currentEmail , $ currentPassword ));
149149 $ this ->assertFalse ($ response ['updateCustomer ' ]['customer ' ]['is_subscribed ' ]);
150150 }
151151
@@ -156,7 +156,7 @@ public function testUnsubscribeCustomer()
156156 * @return array
157157 * @throws AuthenticationException
158158 */
159- private function getCustomerAuthHeaders (string $ email , string $ password ): array
159+ private function getHeaderMap (string $ email , string $ password ): array
160160 {
161161 $ customerToken = $ this ->customerTokenService ->createCustomerAccessToken ($ email , $ password );
162162 return ['Authorization ' => 'Bearer ' . $ customerToken ];
0 commit comments