File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -855,8 +855,7 @@ PHP_METHOD(Redis, setex)
855855 */
856856PHP_METHOD (Redis , psetex )
857857{
858- REDIS_PROCESS_KW_CMD ("PSETEX" , redis_key_long_val_cmd ,
859- redis_string_response );
858+ REDIS_PROCESS_KW_CMD ("PSETEX" , redis_key_long_val_cmd , redis_boolean_response );
860859}
861860
862861/* {{{ 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