Skip to content

Commit 3e8bfd2

Browse files
authored
GraphQL-676: Test unsubscribe customer
- code style fixes
1 parent cc13123 commit 3e8bfd2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function testGetSubscriptionStatusTest()
5252
}
5353
}
5454
QUERY;
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
}
147147
QUERY;
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

Comments
 (0)