Metaphore\Tests\Store\MemcachedStoreTest::testTimestampPassedIfTtlBiggerThan30Days PHP Method

testTimestampPassedIfTtlBiggerThan30Days() public method

public testTimestampPassedIfTtlBiggerThan30Days ( $key, $value, $ttl )
    public function testTimestampPassedIfTtlBiggerThan30Days($key, $value, $ttl)
    {
        $method = (new \ReflectionClass($this->store))->getMethod('prepareTtl');
        $method->setAccessible(true);
        $prepared_ttl = $method->invokeArgs($this->store, [$ttl]);
        // value can be either lower than 30 days or set to unix timestamp in the future
        $this->assertTrue($prepared_ttl <= MemcachedStore::MAX_TTL || $prepared_ttl >= time());
    }