ScopeRepositoryTest
extends AbstractTokenRepositoryTestCase
in package
OAuth2 ScopeRepository tests.
Tags
Table of Contents
- $accessTokenTable : mixed
- getTestScopeRepositoryData() : array<string|int, mixed>
- Data provider for testScopeRepository
- testInvalidConfig() : void
- Test scope repository with invalid configuration
- testScopeRepository() : void
- Test scope repository
- testScopeRepositoryWithInvalidId() : void
- Test scope repository with invalid id
- createAccessTokenRow() : MockObject|AccessToken
- Create AccessToken row
- createClientEntity() : ClientEntity
- Create a client entity
- createExpiryDateTime() : DateTimeImmutable
- Create an expiry datetime.
- createTokenId() : string
- Create a token ID.
- createUserRow() : MockObject|User
- Create User row
- getAccessTokenRepository() : AccessTokenRepository
- Create AccessTokenRepository with mocks.
- getAuthCodeRepository() : AuthCodeRepository
- Create AuthCodeRepository with mocks.
- getMockAccessTokenService() : MockObject|AccessTokenServiceInterface
- Create Access token service
- getMockAccessTokenTable() : MockObject|AccessToken
- Create AccessToken table
- getMockUserService() : MockObject|UserServiceInterface
- Create User service
- getMockUserTable() : MockObject|User
- Create User table
- getOAuth2Config() : array<string|int, mixed>
- Create OAuth2 Config
- getRefreshTokenRepository() : RefreshTokenRepository
- Create RefreshTokenRepository with mocks.
Properties
$accessTokenTable
protected
mixed
$accessTokenTable
= []
Methods
getTestScopeRepositoryData()
Data provider for testScopeRepository
public
static getTestScopeRepositoryData() : array<string|int, mixed>
Return values
array<string|int, mixed> —testInvalidConfig()
Test scope repository with invalid configuration
public
testInvalidConfig() : void
Return values
void —testScopeRepository()
Test scope repository
public
testScopeRepository(string $scopeId, string $desc, bool $hidden, bool $ils) : void
Parameters
- $scopeId : string
-
Scope ID
- $desc : string
-
Expected description
- $hidden : bool
-
Expected hidden value
- $ils : bool
-
Expected "ILS Needed" value
Tags
Return values
void —testScopeRepositoryWithInvalidId()
Test scope repository with invalid id
public
testScopeRepositoryWithInvalidId() : void
Return values
void —createAccessTokenRow()
Create AccessToken row
protected
createAccessTokenRow(array<string|int, mixed> $data) : MockObject|AccessToken
Parameters
- $data : array<string|int, mixed>
-
Row data
Return values
MockObject|AccessToken —createClientEntity()
Create a client entity
protected
createClientEntity() : ClientEntity
Return values
ClientEntity —createExpiryDateTime()
Create an expiry datetime.
protected
createExpiryDateTime() : DateTimeImmutable
Return values
DateTimeImmutable —createTokenId()
Create a token ID.
protected
createTokenId() : string
Follows OAuth2 server's generateUniqueIdentifier.
Return values
string —createUserRow()
Create User row
protected
createUserRow(array<string|int, mixed> $data) : MockObject|User
Parameters
- $data : array<string|int, mixed>
-
Row data
Return values
MockObject|User —getAccessTokenRepository()
Create AccessTokenRepository with mocks.
protected
getAccessTokenRepository() : AccessTokenRepository
Return values
AccessTokenRepository —getAuthCodeRepository()
Create AuthCodeRepository with mocks.
protected
getAuthCodeRepository() : AuthCodeRepository
Return values
AuthCodeRepository —getMockAccessTokenService()
Create Access token service
protected
getMockAccessTokenService() : MockObject|AccessTokenServiceInterface
Return values
MockObject|AccessTokenServiceInterface —getMockAccessTokenTable()
Create AccessToken table
protected
getMockAccessTokenTable() : MockObject|AccessToken
Return values
MockObject|AccessToken —getMockUserService()
Create User service
protected
getMockUserService() : MockObject|UserServiceInterface
Return values
MockObject|UserServiceInterface —getMockUserTable()
Create User table
protected
getMockUserTable() : MockObject|User
Return values
MockObject|User —getOAuth2Config()
Create OAuth2 Config
protected
getOAuth2Config() : array<string|int, mixed>
Return values
array<string|int, mixed> —getRefreshTokenRepository()
Create RefreshTokenRepository with mocks.
protected
getRefreshTokenRepository() : RefreshTokenRepository