setDefaultLifetime() публичный Метод

Sets the default lifetime for this cache backend
public setDefaultLifetime ( integer $lifetime ) : void
$lifetime integer Default lifetime of this cache backend in seconds. If NULL is specified, the default lifetime is used. 0 means unlimited lifetime.
Результат void
 /**
  * @test
  */
 public function setUsesProvidedLifetime()
 {
     $defaultLifetime = 3600;
     $this->backend->setDefaultLifetime($defaultLifetime);
     $expected = ['ex' => 1600];
     $this->redis->expects($this->any())->method('multi')->willReturn($this->redis);
     $this->redis->expects($this->once())->method('set')->with($this->anything(), $this->anything(), $expected)->willReturn($this->redis);
     $this->backend->set('foo', 'bar', [], 1600);
 }