*/
protected $b;
- protected function tearDown(): void {
- if (function_exists('timecop_return')) {
- timecop_return();
- }
- parent::tearDown();
- }
-
public function createSimpleCache($maxTimeouts = [86400]) {
return new CRM_Utils_Cache_Tiered([
$this->a = CRM_Utils_Cache::create([
$this->assertApproxEquals(NULL, $this->a->getExpires('foo'), self::TOLERANCE);
$this->assertApproxEquals($start + 1000, $this->b->getExpires('foo'), self::TOLERANCE);
- function_exists('timecop_return') ? timecop_travel(time() + self::TOLERANCE) : sleep(self::TOLERANCE);
+ sleep(self::TOLERANCE);
$this->assertEquals('bar', $this->cache->get('foo'));
$this->assertApproxEquals($start + 100 + self::TOLERANCE, $this->a->getExpires('foo'), self::TOLERANCE);