class RedisTestDatabases

Methods

static int
baseDatabase()

Get the base Redis DB number.

static int
minimumDatabase()

Get the first Redis DB number available for parallel test workers.

static int
maximumDatabase()

Get the last Redis DB number available for parallel test workers.

static int|null
configuredSecondaryDatabase()

Get the configured secondary Redis DB number.

static int
primaryDatabase(string|false $token)

Get the primary Redis DB number for a test worker.

static int
databaseForToken(string $token)

Get the primary Redis DB number for a parallel testing token.

static int
secondaryDatabase(string|false $token)

Get the secondary Redis DB number.

static array
workerDatabases()

Get the configured Redis worker databases.

static int
workerIndex(string $token)

Get the zero-based Redis worker index for a ParaTest token.

static int
integerEnvironment(string $key, int $default)

Get a non-negative integer Redis environment value.

static int
integerEnvironmentValue(string $key, mixed $value)

Parse a non-negative integer Redis environment value.

Details

at line 15
static int baseDatabase()

Get the base Redis DB number.

Return Value

int

at line 23
static int minimumDatabase()

Get the first Redis DB number available for parallel test workers.

Return Value

int

at line 31
static int maximumDatabase()

Get the last Redis DB number available for parallel test workers.

Return Value

int

at line 39
static int|null configuredSecondaryDatabase()

Get the configured secondary Redis DB number.

Return Value

int|null

at line 52
static int primaryDatabase(string|false $token)

Get the primary Redis DB number for a test worker.

Parameters

string|false $token

Return Value

int

at line 64
static int databaseForToken(string $token)

Get the primary Redis DB number for a parallel testing token.

Parameters

string $token

Return Value

int

at line 83
static int secondaryDatabase(string|false $token)

Get the secondary Redis DB number.

Parameters

string|false $token

Return Value

int

at line 103
static array workerDatabases()

Get the configured Redis worker databases.

Return Value

array

at line 128
static int workerIndex(string $token)

Get the zero-based Redis worker index for a ParaTest token.

Parameters

string $token

Return Value

int

at line 140
static int integerEnvironment(string $key, int $default)

Get a non-negative integer Redis environment value.

Parameters

string $key
int $default

Return Value

int

at line 155
static int integerEnvironmentValue(string $key, mixed $value)

Parse a non-negative integer Redis environment value.

Parameters

string $key
mixed $value

Return Value

int