VuFind API Documentation

ScopeRepositoryTest extends AbstractTokenRepositoryTestCase
in package

OAuth2 ScopeRepository tests.

Tags
category

VuFind

author

Ere Maijala ere.maijala@helsinki.fi

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

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

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
dataProvider

getTestScopeRepositoryData

Return values
void

testScopeRepositoryWithInvalidId()

Test scope repository with invalid id

public testScopeRepositoryWithInvalidId() : void
Return values
void

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

getOAuth2Config()

Create OAuth2 Config

protected getOAuth2Config() : array<string|int, mixed>
Return values
array<string|int, mixed>

Search results