RequiresHashFieldExpiration
trait RequiresHashFieldExpiration
Skips tests when the environment doesn't support Redis hash field expiration.
Expects InteractsWithRedis on the same class — uses redisClient() to probe the server version. The support check is memoized per process.
Methods
Skip the current test if hash field expiration requirements are not met.
Detect the installed phpredis version. Overridable for tests.
Detect the Redis/Valkey server info. Overridable for tests.
Flush the memoized hash field expiration support check.
Details
at line 35
protected void
skipIfHashFieldExpirationUnsupported()
Skip the current test if hash field expiration requirements are not met.
The check runs once per process and is then cached for all subsequent calls.
at line 62
protected string
detectedPhpredisVersion()
Detect the installed phpredis version. Overridable for tests.
at line 72
protected array
detectedServerInfo()
Detect the Redis/Valkey server info. Overridable for tests.
at line 82
static void
flushHashFieldExpirationState()
Flush the memoized hash field expiration support check.
Resets the capability result shared by tests in this class.