@@ -52,7 +52,7 @@ public function testGetSubscriptionStatusTest()
52
52
}
53
53
}
54
54
QUERY ;
55
- $ response = $ this ->graphQlQuery ($ query , [], '' , $ this ->getCustomerAuthHeaders ($ currentEmail , $ currentPassword ));
55
+ $ response = $ this ->graphQlQuery ($ query , [], '' , $ this ->getHeaderMap ($ currentEmail , $ currentPassword ));
56
56
$ this ->assertFalse ($ response ['customer ' ]['is_subscribed ' ]);
57
57
}
58
58
@@ -75,7 +75,7 @@ public function testGetSubscriptionStatusIfUserIsNotAuthorizedTest()
75
75
/**
76
76
* @magentoApiDataFixture Magento/Customer/_files/customer.php
77
77
*/
78
- public function testChangeSubscriptionStatusTest ()
78
+ public function testSubscribeCustomer ()
79
79
{
80
80
$ currentEmail = 'customer@example.com ' ;
81
81
$ currentPassword = 'password ' ;
@@ -97,7 +97,7 @@ public function testChangeSubscriptionStatusTest()
97
97
$ query ,
98
98
[],
99
99
'' ,
100
- $ this ->getCustomerAuthHeaders ($ currentEmail , $ currentPassword )
100
+ $ this ->getHeaderMap ($ currentEmail , $ currentPassword )
101
101
);
102
102
$ this ->assertTrue ($ response ['updateCustomer ' ]['customer ' ]['is_subscribed ' ]);
103
103
}
@@ -145,7 +145,7 @@ public function testUnsubscribeCustomer()
145
145
}
146
146
}
147
147
QUERY ;
148
- $ response = $ this ->graphQlMutation ($ query , [], '' , $ this ->getCustomerAuthHeaders ($ currentEmail , $ currentPassword ));
148
+ $ response = $ this ->graphQlMutation ($ query , [], '' , $ this ->getHeaderMap ($ currentEmail , $ currentPassword ));
149
149
$ this ->assertFalse ($ response ['updateCustomer ' ]['customer ' ]['is_subscribed ' ]);
150
150
}
151
151
@@ -156,7 +156,7 @@ public function testUnsubscribeCustomer()
156
156
* @return array
157
157
* @throws AuthenticationException
158
158
*/
159
- private function getCustomerAuthHeaders (string $ email , string $ password ): array
159
+ private function getHeaderMap (string $ email , string $ password ): array
160
160
{
161
161
$ customerToken = $ this ->customerTokenService ->createCustomerAccessToken ($ email , $ password );
162
162
return ['Authorization ' => 'Bearer ' . $ customerToken ];
0 commit comments