8000 [Cache] Fix tests · symfony/symfony@41f3f82 · GitHub
[go: up one dir, main page]

Skip to content

Commit 41f3f82

Browse files
[Cache] Fix tests
1 parent cef7e5b commit 41f3f82

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Symfony/Component/Cache/Tests/Adapter/ChainAdapterTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\Cache\Tests\Adapter;
1313

1414
use Cache\IntegrationTests\CachePoolTest;
15-
use Symfony\Component\Cache\Adapter\ApcuAdapter;
15+
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
1616
use Symfony\Component\Cache\Adapter\ArrayAdapter;
1717
use Symfony\Component\Cache\Adapter\ChainAdapter;
1818
use Symfony\Component\Cache\Tests\Fixtures\ExternalAdapter;
@@ -27,11 +27,8 @@ public function createCachePool()
2727
if (defined('HHVM_VERSION')) {
2828
$this->skippedTests['testDeferredSaveWithoutCommit'] = 'Fails on HHVM';
2929
}
30-
if (!function_exists('apcu_fetch') || !ini_get('apc.enabled') || ('cli' === PHP_SAPI && !ini_get('apc.enable_cli'))) {
31-
$this->markTestSkipped('APCu extension is required.');
32-
}
3330

34-
return new ChainAdapter(array(new ArrayAdapter(), new ExternalAdapter(), new ApcuAdapter()));
31+
return new ChainAdapter(array(new ArrayAdapter(), new ExternalAdapter(), new FilesystemAdapter(null)));
3532
}
3633

3734
/**

src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ public function createCachePool()
3333
public static function setupBeforeClass()
3434
{
3535
self::$redis = new \Redis();
36-
self::$redis->connect('127.0.0.1');
36+
if (!@self::$redis->connect('127.0.0.1')) {
37+
$e = error_get_last();
38+
self::markTestSkipped($e['message']);
39+
}
3740
self::$redis->select(1993);
3841
}
3942

0 commit comments

Comments
 (0)
0