File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,10 @@ allow_failures:
1313
1414install :
1515 - yes '' | pecl install -f redis
16- - wget http://download.redis.io/releases/redis-3.2.11 .tar.gz
17- - tar -xzf redis-3.2.11 .tar.gz
18- - make -s -C redis-3.2.11 -j4
19- - export PATH=$PATH:$PWD/redis-3.2.11 /src/
16+ - wget http://download.redis.io/releases/redis-4.0.8 .tar.gz
17+ - tar -xzf redis-4.0.8 .tar.gz
18+ - make -s -C redis-4.0.8 -j4
19+ - export PATH=$PATH:$PWD/redis-4.0.8 /src/
2020
2121script :
2222 - phpunit
Original file line number Diff line number Diff line change @@ -1186,6 +1186,10 @@ public function __call($name, $args)
11861186 throw new CredisException ($ error );
11871187 }
11881188 break ;
1189+ case 'exists ' :
1190+ // smooth over phpredis-v4 vs earlier difference to match documented credis return results
1191+ $ response = (int ) $ response ;
1192+ break ;
11891193 default :
11901194 $ error = $ this ->redis ->getLastError ();
11911195 $ this ->redis ->clearLastError ();
Original file line number Diff line number Diff line change @@ -65,6 +65,10 @@ public function testScalars()
6565 $ this ->assertEquals ('FOO ' , $ this ->credis ->get ('foo ' ));
6666 $ this ->assertFalse ($ this ->credis ->get ('nil ' ));
6767
68+ // exists support
69+ $ this ->assertEquals ($ this ->credis ->exists ('foo ' ), 1 );
70+ $ this ->assertEquals ($ this ->credis ->exists ('nil ' ), 0 );
71+
6872 // Empty string
6973 $ this ->credis ->set ('empty ' ,'' );
7074 $ this ->assertEquals ('' , $ this ->credis ->get ('empty ' ));
You can’t perform that action at this time.
0 commit comments