protected $skippedTests =
[ 'testHasItemReturnsFalseWhenDeferredItemIsExpired' => 'Testing expiration slows down the test suite',
'testDefaultLifeTime' => 'Testing expiration slows down the test suite',
'testClearPrefix' => 'Memcached cannot clear by prefix',
];
protected static \Memcached
$client;
public static function setUpBeforeClass(): void
{ if (!MemcachedAdapter::
isSupported()) { throw new SkippedTestSuiteError('Extension memcached > 3.1.5 required.'
);
} self::
$client = AbstractAdapter::
createConnection('memcached://'.
getenv('MEMCACHED_HOST'
),
['binary_protocol' => false
]);
self::
$client->
get('foo'
);
$code = self::
$client->
getResultCode();
if (\Memcached::RES_SUCCESS !==
$code && \Memcached::RES_NOTFOUND !==
$code) { throw new SkippedTestSuiteError('Memcached error: '.
strtolower(self::
$client->
getResultMessage()));
} }