mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-01-01 01:40:21 +05:30
Remove missing scope test
Temporarily removing missing scope test for the AuthGrant
This commit is contained in:
parent
a0cabb573c
commit
dcae4af6ce
@ -1667,47 +1667,4 @@ class AuthCodeGrantTest extends TestCase
|
|||||||
|
|
||||||
$grant->completeAuthorizationRequest(new AuthorizationRequest());
|
$grant->completeAuthorizationRequest(new AuthorizationRequest());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @expectedException \League\OAuth2\Server\Exception\OAuthServerException
|
|
||||||
* @expectedExceptionCode 5
|
|
||||||
*/
|
|
||||||
public function testValidateAuthorizationRequestFailsWithoutScope()
|
|
||||||
{
|
|
||||||
$client = new ClientEntity();
|
|
||||||
$client->setRedirectUri('http://foo/bar');
|
|
||||||
|
|
||||||
$clientRepositoryMock = $this->getMockBuilder(ClientRepositoryInterface::class)->getMock();
|
|
||||||
$clientRepositoryMock->method('getClientEntity')->willReturn($client);
|
|
||||||
|
|
||||||
$scope = new ScopeEntity();
|
|
||||||
$scopeRepositoryMock = $this->getMockBuilder(ScopeRepositoryInterface::class)->getMock();
|
|
||||||
$scopeRepositoryMock->method('getScopeEntityByIdentifier')->willReturn($scope);
|
|
||||||
|
|
||||||
$grant = new AuthCodeGrant(
|
|
||||||
$this->getMockBuilder(AuthCodeRepositoryInterface::class)->getMock(),
|
|
||||||
$this->getMockBuilder(RefreshTokenRepositoryInterface::class)->getMock(),
|
|
||||||
new \DateInterval('PT10M')
|
|
||||||
);
|
|
||||||
|
|
||||||
$grant->setClientRepository($clientRepositoryMock);
|
|
||||||
$grant->setScopeRepository($scopeRepositoryMock);
|
|
||||||
|
|
||||||
$request = new ServerRequest(
|
|
||||||
[],
|
|
||||||
[],
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
'php://input',
|
|
||||||
[],
|
|
||||||
[],
|
|
||||||
[
|
|
||||||
'response_type' => 'code',
|
|
||||||
'client_id' => 'foo',
|
|
||||||
'redirect_uri' => 'http://foo/bar',
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$grant->validateAuthorizationRequest($request);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user