File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -837,8 +837,7 @@ PHP_METHOD(Redis, setex)
837837 */
838838PHP_METHOD (Redis , psetex )
839839{
840- REDIS_PROCESS_KW_CMD ("PSETEX" , redis_key_long_val_cmd ,
841- redis_string_response );
840+ REDIS_PROCESS_KW_CMD ("PSETEX" , redis_key_long_val_cmd , redis_boolean_response );
842841}
843842
844843/* {{{ proto boolean Redis::setnx(string key, string value)
Original file line number Diff line number Diff line change @@ -456,6 +456,13 @@ public function testSetEx() {
456456 $ this ->assertTrue ($ this ->redis ->ttl ('key ' ) ===7 );
457457 $ this ->assertTrue ($ this ->redis ->get ('key ' ) === 'val ' );
458458 }
459+
460+ public function testPSetEx () {
461+ $ this ->redis ->del ('key ' );
462+ $ this ->assertTrue ($ this ->redis ->psetex ('key ' , 7 * 1000 , 'val ' ) === TRUE );
463+ $ this ->assertTrue ($ this ->redis ->ttl ('key ' ) ===7 );
464+ $ this ->assertTrue ($ this ->redis ->get ('key ' ) === 'val ' );
465+ }
459466
460467 public function testSetNX () {
461468
You can’t perform that action at this time.
0 commit comments