示例#1
0
文件: PredisTest.php 项目: gmo/cache
 /**
  * @group redis-strings
  */
 public function testPreciseSetEx()
 {
     $this->assertEquals('OK', $this->client->psetex('foo', 20000, 'bar'));
     $this->assertEquals('OK', $this->client->psetex('foo', 20000, 'baz'));
     $this->assertSame('baz', $this->client->get('foo'));
     $this->assertThat($this->client->ttl('foo'), $this->logicalAnd($this->greaterThan(0), $this->lessThanOrEqual(20)));
 }