@@ -291,25 +291,33 @@ public function test_it_calculates_union_of_sorted_sets_and_stores()
291291
292292 public function test_it_returns_range_in_sorted_set ()
293293 {
294- foreach ($ this ->connections () as $ redis ) {
294+ foreach ($ this ->connections () as $ connector => $ redis ) {
295295 $ redis ->zadd ('set ' , ['jeffrey ' => 1 , 'matt ' => 5 , 'taylor ' => 10 ]);
296296 $ this ->assertEquals (['jeffrey ' , 'matt ' ], $ redis ->zrange ('set ' , 0 , 1 ));
297297 $ this ->assertEquals (['jeffrey ' , 'matt ' , 'taylor ' ], $ redis ->zrange ('set ' , 0 , -1 ));
298298
299- $ this ->assertEquals (['jeffrey ' => 1 , 'matt ' => 5 ], $ redis ->zrange ('set ' , 0 , 1 , 'withscores ' ));
299+ if ($ connector === 'predis ' ) {
300+ $ this ->assertEquals (['jeffrey ' => 1 , 'matt ' => 5 ], $ redis ->zrange ('set ' , 0 , 1 , 'withscores ' ));
301+ } else {
302+ $ this ->assertEquals (['jeffrey ' => 1 , 'matt ' => 5 ], $ redis ->zrange ('set ' , 0 , 1 , true ));
303+ }
300304
301305 $ redis ->flushall ();
302306 }
303307 }
304308
305309 public function test_it_returns_rev_range_in_sorted_set ()
306310 {
307- foreach ($ this ->connections () as $ redis ) {
311+ foreach ($ this ->connections () as $ connector => $ redis ) {
308312 $ redis ->zadd ('set ' , ['jeffrey ' => 1 , 'matt ' => 5 , 'taylor ' => 10 ]);
309313 $ this ->assertEquals (['taylor ' , 'matt ' ], $ redis ->ZREVRANGE ('set ' , 0 , 1 ));
310314 $ this ->assertEquals (['taylor ' , 'matt ' , 'jeffrey ' ], $ redis ->ZREVRANGE ('set ' , 0 , -1 ));
311315
312- $ this ->assertEquals (['matt ' => 5 , 'taylor ' => 10 ], $ redis ->ZREVRANGE ('set ' , 0 , 1 , 'withscores ' ));
316+ if ($ connector === 'predis ' ) {
317+ $ this ->assertEquals (['matt ' => 5 , 'taylor ' => 10 ], $ redis ->ZREVRANGE ('set ' , 0 , 1 , 'withscores ' ));
318+ } else {
319+ $ this ->assertEquals (['matt ' => 5 , 'taylor ' => 10 ], $ redis ->ZREVRANGE ('set ' , 0 , 1 , true ));
320+ }
313321
314322 $ redis ->flushall ();
315323 }
@@ -550,8 +558,8 @@ public function test_it_persists_connection()
550558 public function connections ()
551559 {
552560 $ connections = [
553- $ this ->redis ['predis ' ]->connection (),
554- $ this ->redis ['phpredis ' ]->connection (),
561+ ' predis ' => $ this ->redis ['predis ' ]->connection (),
562+ ' phpredis ' => $ this ->redis ['phpredis ' ]->connection (),
555563 ];
556564
557565 if (extension_loaded ('redis ' )) {
0 commit comments