Ejemplo n.º 1
0
 /**
  * @group redis-keys
  */
 public function testPreciseTtl()
 {
     $this->assertSame(-2, $this->client->ttl('foo'));
     $this->client->set('foo', 'bar');
     $this->assertSame(-1, $this->client->ttl('foo'));
     $this->client->expire('foo', 20);
     $this->assertThat($this->client->pttl('foo'), $this->logicalAnd($this->greaterThan(0), $this->lessThanOrEqual(20000)));
 }