@@ -187,38 +187,6 @@ public function testApiClient(GitlabResourceOwner $owner)
187
187
$ this ->assertInstanceOf (\Gitlab \Client::class, $ client );
188
188
}
189
189
190
- /* public function testUserEmails()
191
- {
192
-
193
- $userId = rand(1000,9999);
194
- $name = uniqid();
195
- $nickname = uniqid();
196
- $email = uniqid();
197
-
198
- $postResponse = m::mock('Psr\Http\Message\ResponseInterface');
199
- $postResponse->shouldReceive('getBody')->andReturn('access_token=mock_access_token&expires=3600&refresh_token=mock_refresh_token&otherKey={1234}');
200
- $postResponse->shouldReceive('getHeader')->andReturn(['content-type' => 'application/x-www-form-urlencoded']);
201
-
202
- $userResponse = m::mock('Psr\Http\Message\ResponseInterface');
203
- $userResponse->shouldReceive('getBody')->andReturn('[{"email":"mock_email_1","primary":false,"verified":true},{"email":"mock_email_2","primary":false,"verified":true},{"email":"mock_email_3","primary":true,"verified":true}]');
204
- $userResponse->shouldReceive('getHeader')->andReturn(['content-type' => 'json']);
205
-
206
- $client = m::mock('GuzzleHttp\ClientInterface');
207
- $client->shouldReceive('send')
208
- ->times(2)
209
- ->andReturn($postResponse, $userResponse);
210
- $this->provider->setHttpClient($client);
211
-
212
- $token = $this->provider->getAccessToken('authorization_code', ['code' => 'mock_authorization_code']);
213
- $emails = $this->provider->getUserEmails($token);
214
-
215
- $this->assertEquals($userId, $user->getUserId());
216
- $this->assertEquals($name, $user->getName());
217
- $this->assertEquals($nickname, $user->getNickname());
218
- $this->assertEquals($email, $user->getEmail());
219
- $this->assertContains($nickname, $user->getUrl());
220
- } */
221
-
222
190
public function testExceptionThrownWhenErrorObjectReceived ()
223
191
{
224
192
$ status = rand (400 , 600 );
0 commit comments