diff --git a/ApcuCachePool.php b/ApcuCachePool.php index 42ee4e4..67cba0b 100644 --- a/ApcuCachePool.php +++ b/ApcuCachePool.php @@ -24,7 +24,7 @@ protected function fetchObjectFromCache($key) $success = false; $data = apcu_fetch($key, $success); - return [$success, $data]; + return [$success, $data, []]; } protected function clearAllObjectsFromCache() @@ -39,12 +39,12 @@ protected function clearOneObjectFromCache($key) return true; } - protected function storeItemInCache($key, CacheItemInterface $item, $ttl) + protected function storeItemInCache(CacheItemInterface $item, $ttl) { if ($ttl < 0) { return false; } - return apcu_store($key, $item->get(), $ttl); + return apcu_store($item->getKey(), $item->get(), $ttl); } } diff --git a/Tests/IntegrationPoolTest.php b/Tests/IntegrationPoolTest.php index 0eb0afa..881cf94 100644 --- a/Tests/IntegrationPoolTest.php +++ b/Tests/IntegrationPoolTest.php @@ -17,7 +17,9 @@ class IntegrationPoolTest extends BaseTest { protected $skippedTests = [ - 'testExpiration' => 'The cache expire at the next request.', + 'testExpiration' => 'The cache expire at the next request.', + 'testSaveExpired' => 'The cache expire at the next request.', + 'testDeferredExpired' => 'The cache expire at the next request.', ]; public function createCachePool() diff --git a/Tests/IntegrationTagTest.php b/Tests/IntegrationTagTest.php deleted file mode 100644 index 3d77af0..0000000 --- a/Tests/IntegrationTagTest.php +++ /dev/null @@ -1,27 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Adapter\Apcu\Tests; - -use Cache\Adapter\Apcu\ApcuCachePool; -use Cache\IntegrationTests\TaggableCachePoolTest; - -class IntegrationTagTest extends TaggableCachePoolTest -{ - public function createCachePool() - { - if (defined('HHVM_VERSION') || !function_exists('apcu_store')) { - $this->markTestSkipped(); - } - - return new ApcuCachePool(); - } -} diff --git a/composer.json b/composer.json index 9083263..565bd0f 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ }, "require-dev": { "phpunit/phpunit": "^4.0|^5.1", - "cache/integration-tests": "0.7.0" + "cache/integration-tests": "0.9.0" }, "provide": { "psr/cache-implementation": "^1.0"