OAuth2ProviderLiveTestAbstract
extends OAuthProviderLiveTestAbstract
in package
AbstractYes
Table of Contents
Constants
- CACERT = __DIR__ . '/../cacert.pem'
- PROJECT_ROOT = __DIR__ . '/../../'
Properties
- $provider : OAuth2Interface
- $provider : OAuthInterface
- $CFG_DIR : string
- $clientCredentialsScopes : array<string|int, mixed>
- $dotEnv : DotEnv
- $ENV_IS_CI : bool
- $ENV_PREFIX : string
- $HTTP_CLIENT_FACTORY : string
- $logger : LoggerInterface
- $options : OAuthOptions
- $provider : OAuthInterface
- $reflection : ReflectionClass
- $storage : OAuthStorageInterface
- $TEST_USER : string
- a test username for live API tests, defined in .env as {ENV-PREFIX}_TESTUSER
Methods
- testMe() : void
- testMeErrorException() : void
- testRequestCredentialsToken() : void
- assertMeErrorException() : void
- assertMeResponse() : void
- getEnvPrefix() : string|null
- returns the prefix in the .env file for the current provider
- getProviderFQCN() : string
- returns the fully qualified class name (FQCN) of the test subject
- getReflectionProperty() : mixed
- initEnvConfig() : void
- initOptions() : OAuthOptions
- initProvider() : OAuthInterface|OAuth1Interface|OAuth2Interface
- initStorage() : OAuthStorageInterface
- invokeReflection() : object
- invokeReflectionMethod() : mixed
- setReflectionProperty() : void
- setUp() : void
Constants
CACERT
protected
mixed
CACERT
= __DIR__ . '/../cacert.pem'
PROJECT_ROOT
protected
mixed
PROJECT_ROOT
= __DIR__ . '/../../'
Properties
$provider
public
OAuth2Interface
$provider
$provider
public
OAuthInterface
$provider
$CFG_DIR
protected
string
$CFG_DIR
$clientCredentialsScopes
protected
array<string|int, mixed>
$clientCredentialsScopes
= []
$dotEnv
protected
DotEnv
$dotEnv
$ENV_IS_CI
protected
bool
$ENV_IS_CI
$ENV_PREFIX
protected
string
$ENV_PREFIX
$HTTP_CLIENT_FACTORY
protected
string
$HTTP_CLIENT_FACTORY
= \chillerlan\OAuthTest\Providers\ProviderUnitTestHttpClientFactory::class
$logger
protected
LoggerInterface
$logger
$options
protected
OAuthOptions
$options
$provider
protected
OAuthInterface
$provider
$reflection
protected
ReflectionClass
$reflection
$storage
protected
OAuthStorageInterface
$storage
$TEST_USER
a test username for live API tests, defined in .env as {ENV-PREFIX}_TESTUSER
protected
string
$TEST_USER
= ''
Methods
testMe()
public
testMe() : void
testMeErrorException()
public
testMeErrorException() : void
testRequestCredentialsToken()
public
testRequestCredentialsToken() : void
assertMeErrorException()
protected
assertMeErrorException(AccessToken $token) : void
Parameters
- $token : AccessToken
assertMeResponse()
protected
abstract assertMeResponse(ResponseInterface $response, object|null $json) : void
Parameters
- $response : ResponseInterface
- $json : object|null
getEnvPrefix()
returns the prefix in the .env file for the current provider
protected
abstract getEnvPrefix() : string|null
Return values
string|nullgetProviderFQCN()
returns the fully qualified class name (FQCN) of the test subject
protected
abstract getProviderFQCN() : string
Return values
stringgetReflectionProperty()
protected
final getReflectionProperty(string $property) : mixed
Parameters
- $property : string
initEnvConfig()
protected
initEnvConfig() : void
initOptions()
protected
initOptions() : OAuthOptions
Return values
OAuthOptionsinitProvider()
protected
initProvider(string $FQCN) : OAuthInterface|OAuth1Interface|OAuth2Interface
Parameters
- $FQCN : string
Return values
OAuthInterface|OAuth1Interface|OAuth2InterfaceinitStorage()
protected
initStorage(OAuthOptions $options) : OAuthStorageInterface
Parameters
- $options : OAuthOptions
Return values
OAuthStorageInterfaceinvokeReflection()
protected
final invokeReflection(string $FQCN[, array<string|int, mixed> $args = [] ]) : object
Parameters
- $FQCN : string
- $args : array<string|int, mixed> = []
Return values
objectinvokeReflectionMethod()
protected
final invokeReflectionMethod(string $method[, array<string|int, mixed> $args = [] ]) : mixed
Parameters
- $method : string
- $args : array<string|int, mixed> = []
setReflectionProperty()
protected
final setReflectionProperty(string $property, mixed $value) : void
Parameters
- $property : string
- $value : mixed
setUp()
protected
setUp() : void