public function RedisTestInterfaceTrait::getRedisInterfaceEnv in Redis 8
Uses an env variable to set the redis client to use for this test.
6 calls to RedisTestInterfaceTrait::getRedisInterfaceEnv()
- RedisLockFunctionalTest::setUp in tests/
src/ Functional/ Lock/ RedisLockFunctionalTest.php - RedisLockFunctionalTest::testLockAcquire in tests/
src/ Functional/ Lock/ RedisLockFunctionalTest.php - Confirms that we can acquire and release locks in two parallel requests.
- RedisLockFunctionalTest::testPersistentLock in tests/
src/ Functional/ Lock/ RedisLockFunctionalTest.php - Tests that the persistent lock is persisted between requests.
- RedisLockTest::testBackendLockRelease in tests/
src/ Kernel/ RedisLockTest.php - Tests backend release functionality.
- RedisTestInterfaceTrait::setUpSettings in tests/
src/ Traits/ RedisTestInterfaceTrait.php - Uses an env variable to set the redis client to use for this test.
File
- tests/
src/ Traits/ RedisTestInterfaceTrait.php, line 24
Class
Namespace
Drupal\Tests\redis\TraitsCode
public function getRedisInterfaceEnv() {
// Get REDIS_INTERFACE from env variable.
$redis_interface = getenv('REDIS_INTERFACE');
// Default to PhpRedis is env variable not available.
if ($redis_interface == FALSE) {
$redis_interface = 'PhpRedis';
}
return $redis_interface;
}