From 0b6ab4dea4ff97f335de623068b48c67972bd357 Mon Sep 17 00:00:00 2001 From: Vladyslav Vildanov <117659936+vladvildanov@users.noreply.github.com> Date: Wed, 12 Jul 2023 09:57:42 +0300 Subject: [PATCH] Added support for CLIENT NO-EVICT command (#1335) --- tests/Predis/Command/Redis/CLIENT_Test.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/Predis/Command/Redis/CLIENT_Test.php b/tests/Predis/Command/Redis/CLIENT_Test.php index 41fe4176f..d532b9047 100644 --- a/tests/Predis/Command/Redis/CLIENT_Test.php +++ b/tests/Predis/Command/Redis/CLIENT_Test.php @@ -172,6 +172,18 @@ public function testSetsNameOfConnection(): void $this->assertEquals($expectedConnectionName, $redis->client('GETNAME')); } + /** + * @group connected + * @requiresRedisVersion >= 7.0.0 + */ + public function testSetNoEvictModeForCurrentConnection(): void + { + $redis = $this->getClient(); + + $this->assertEquals('OK', $redis->client('NO-EVICT', 'ON')); + $this->assertEquals('OK', $redis->client('NO-EVICT', 'OFF')); + } + /** * @return array */