diff --git a/lib/Persistence/PurgeLimiter.php b/lib/Persistence/PurgeLimiter.php index 1b99d680..629dd921 100644 --- a/lib/Persistence/PurgeLimiter.php +++ b/lib/Persistence/PurgeLimiter.php @@ -70,23 +70,18 @@ class PurgeLimiter extends AbstractPersistence return true; } - $file = 'purge_limiter.php'; - $now = time(); - $content = '= $now) { + return false; + } } - $path = self::getPath($file); - require $path; - $pl = $GLOBALS['purge_limiter']; - - if ($pl + self::$_limit >= $now) { - $result = false; - } else { - $result = true; - self::_store($file, $content); - } - return $result; + $content = 'assertEquals(false, PurgeLimiter::canPurge()); sleep(2); $this->assertEquals(true, PurgeLimiter::canPurge());