Another attempt to fix apcu tests
This commit is contained in:
parent
7590184b5f
commit
1230434e16
@ -4,7 +4,6 @@
|
||||
stopOnFailure="false"
|
||||
bootstrap="../tests/bootstrap.php"
|
||||
beStrictAboutTestsThatDoNotTestAnything="true"
|
||||
checkForUnintentionallyCoveredCode="true"
|
||||
>
|
||||
<filter>
|
||||
<whitelist>
|
||||
|
@ -51,7 +51,7 @@ class ApcuDriver extends AbstractDriver {
|
||||
*/
|
||||
public function exists(string $key): bool
|
||||
{
|
||||
return \apcu_exists($key) !== FALSE;
|
||||
return apcu_exists($key) !== FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -62,7 +62,7 @@ class ApcuDriver extends AbstractDriver {
|
||||
*/
|
||||
public function get(string $key)
|
||||
{
|
||||
return \apcu_fetch($key);
|
||||
return apcu_fetch($key);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -94,13 +94,13 @@ class ApcuDriver extends AbstractDriver {
|
||||
*/
|
||||
public function set(string $key, $value, int $expires = 0): DriverInterface
|
||||
{
|
||||
if ( ! \apcu_exists($key))
|
||||
if ( ! apcu_exists($key))
|
||||
{
|
||||
\apcu_add($key, $value, $expires);
|
||||
apcu_add($key, $value, $expires);
|
||||
}
|
||||
else
|
||||
{
|
||||
\apcu_store($key, $value, $expires);
|
||||
apcu_store($key, $value, $expires);
|
||||
}
|
||||
|
||||
return $this;
|
||||
@ -114,7 +114,7 @@ class ApcuDriver extends AbstractDriver {
|
||||
*/
|
||||
public function delete(string $key): bool
|
||||
{
|
||||
return \apcu_delete($key);
|
||||
return apcu_delete($key);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -125,7 +125,7 @@ class ApcuDriver extends AbstractDriver {
|
||||
*/
|
||||
public function deleteMultiple(array $keys = []): bool
|
||||
{
|
||||
return \apcu_delete($keys);
|
||||
return apcu_delete($keys);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -137,13 +137,10 @@ class ApcuDriver extends AbstractDriver {
|
||||
{
|
||||
if (function_exists('apcu_clear_cache'))
|
||||
{
|
||||
return \apcu_clear_cache();
|
||||
return apcu_clear_cache();
|
||||
}
|
||||
|
||||
if (function_exists('apc_clear_cache'))
|
||||
{
|
||||
return \apc_clear_cache();
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -158,7 +155,7 @@ class ApcuDriver extends AbstractDriver {
|
||||
if ($this->exists($key))
|
||||
{
|
||||
$value = $this->get($key);
|
||||
return \apcu_store($key, $value, $expires);
|
||||
return apcu_store($key, $value, $expires);
|
||||
}
|
||||
|
||||
$this->getLogger()->warn("Tried to set expiration on a key that does not exist");
|
||||
|
Loading…
Reference in New Issue
Block a user