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 14
static int baseDatabase()

Get the base Redis DB number.

Return Value

int

at line 22
static int minimumDatabase()

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

Return Value

int

at line 30
static int maximumDatabase()

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

Return Value

int

at line 38
static int|null configuredSecondaryDatabase()

Get the configured secondary Redis DB number.

Return Value

int|null

at line 50
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 62
static int databaseForToken(string $token)

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

Parameters

string $token

Return Value

int

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

Get the secondary Redis DB number.

Parameters

string|false $token

Return Value

int

at line 101
static array workerDatabases()

Get the configured Redis worker databases.

Return Value

array

at line 126
static int workerIndex(string $token)

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

Parameters

string $token

Return Value

int

at line 138
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 152
static int integerEnvironmentValue(string $key, mixed $value)

Parse a non-negative integer Redis environment value.

Parameters

string $key
mixed $value

Return Value

int