Skip to content

Commit 0c37361

Browse files
committed
Retire broken and unneeded test
1 parent d554640 commit 0c37361

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

src/Provider/GitlabResourceOwner.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public function getDomain(): string
7272
}
7373

7474
/**
75-
* @param string $domain
7675
* @return $this
7776
*/
7877
public function setDomain(string $domain): self
@@ -162,7 +161,6 @@ public function toArray(): array
162161
}
163162

164163
/**
165-
* @param string $key
166164
* @param mixed|null $default
167165
* @return mixed|null
168166
*/

test/src/Provider/GitlabTest.php

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -187,38 +187,6 @@ public function testApiClient(GitlabResourceOwner $owner)
187187
$this->assertInstanceOf(\Gitlab\Client::class, $client);
188188
}
189189

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-
222190
public function testExceptionThrownWhenErrorObjectReceived()
223191
{
224192
$status = rand(400, 600);

0 commit comments

Comments
 (0)