From 07eb1248874926b4e03ae2fe3be81f42e992ede9 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Sat, 18 Feb 2023 13:03:10 -0600 Subject: [PATCH] Rename getRangeLexicographically to getLexicographicRange --- src/RedisSortedSet.php | 2 +- test/RedisSortedSetTest.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/RedisSortedSet.php b/src/RedisSortedSet.php index c1a766c..89c2b4b 100644 --- a/src/RedisSortedSet.php +++ b/src/RedisSortedSet.php @@ -91,7 +91,7 @@ public function getRangeByScoreWithScores(ScoreBoundary $start, ScoreBoundary $e /** * @return Promise> */ - public function getRangeLexicographically(string $start, string $end, ?RangeOptions $options = null): Promise + public function getLexicographicRange(string $start, string $end, ?RangeOptions $options = null): Promise { $query = ['zrange', $this->key, $start, $end, 'BYLEX']; if ($options !== null) { diff --git a/test/RedisSortedSetTest.php b/test/RedisSortedSetTest.php index fe8728a..b83ac1c 100644 --- a/test/RedisSortedSetTest.php +++ b/test/RedisSortedSetTest.php @@ -83,8 +83,8 @@ public function testLexSet(): \Generator 'd' => 0, ])); - $this->assertSame(['a', 'b', 'c'], yield $set->getRangeLexicographically('[a', '[c')); - $this->assertSame(['b', 'c'], yield $set->getRangeLexicographically('(a', '[c')); - $this->assertSame(['a', 'b', 'c'], yield $set->getRangeLexicographically('-', '(d')); + $this->assertSame(['a', 'b', 'c'], yield $set->getLexicographicRange('[a', '[c')); + $this->assertSame(['b', 'c'], yield $set->getLexicographicRange('(a', '[c')); + $this->assertSame(['a', 'b', 'c'], yield $set->getLexicographicRange('-', '(d')); } }