@@ -77,27 +77,7 @@ public function testRegisteredCustomerWithValidCredentials()
77
77
" Addresses field must be of an array type. "
78
78
);
79
79
$ this ->assertCustomerFields ($ customer , $ response ['customer ' ]);
80
- $ this ->assertCustomerAddressesFields ($ customer , $ response );
81
- }
82
-
83
- /**
84
- * Verify Customer with valid token but invalid login credentials
85
- *
86
- * @magentoApiDataFixture Magento/Customer/_files/customer.php
87
- * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
88
- */
89
- public function testCustomerTokenWithInvalidCredentials ()
90
- {
91
-
92
- $ password = 'wrongPassword ' ;
93
- $ this ->expectException (\Exception::class);
94
- $ this ->expectExceptionMessage ('You did not sign in correctly or your account is temporarily disabled. ' );
95
-
96
- /** @var \Magento\Integration\Api\CustomerTokenServiceInterface $customerTokenService */
97
- $ customerTokenService = ObjectManager::getInstance ()
98
- ->get (\Magento \Integration \Api \CustomerTokenServiceInterface::class);
99
- $ customerToken = $ customerTokenService ->createCustomerAccessToken ($ userName , $ password );
100
- $ this ->setToken ($ customerToken );
80
+ $ this ->assertCustomerAddressesFields ($ customer , $ response );
101
81
}
102
82
103
83
/**
@@ -135,6 +115,7 @@ public function testCustomerWithValidCredentialsWithoutToken()
135
115
}
136
116
137
117
/**
118
+ * Veriy the all the whitelisted fields for a Customer Object
138
119
* @param CustomerInterface $customer
139
120
* @param $actualResponse
140
121
*/
@@ -163,6 +144,7 @@ public function assertCustomerFields($customer, $actualResponse)
163
144
}
164
145
165
146
/**
147
+ * Verify the fields for CustomerAddress object
166
148
* @param CustomerInterface $customer
167
149
* @param array $actualResponse
168
150
*/
@@ -171,7 +153,6 @@ public function assertCustomerAddressesFields($customer, $actualResponse)
171
153
{
172
154
/** @var AddressInterface $addresses */
173
155
$ addresses = $ customer ->getAddresses ();
174
-
175
156
foreach ( $ addresses as $ addressKey => $ addressValue ) {
176
157
$ this ->assertNotEmpty ($ addressValue );
177
158
$ assertionMap = [
0 commit comments