minor #18432 [Cache] Fix tests (nicolas-grekas)

This PR was merged into the 3.1-dev branch.

Discussion
----------

[Cache] Fix tests

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

41f3f82 [Cache] Fix tests
This commit is contained in:
Nicolas Grekas 2016-04-04 11:31:10 +02:00
commit 85506a0cbe
2 changed files with 6 additions and 6 deletions

View File

@ -12,7 +12,7 @@
namespace Symfony\Component\Cache\Tests\Adapter;
use Cache\IntegrationTests\CachePoolTest;
use Symfony\Component\Cache\Adapter\ApcuAdapter;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Cache\Adapter\ArrayAdapter;
use Symfony\Component\Cache\Adapter\ChainAdapter;
use Symfony\Component\Cache\Tests\Fixtures\ExternalAdapter;
@ -27,11 +27,8 @@ class ChainAdapterTest extends CachePoolTest
if (defined('HHVM_VERSION')) {
$this->skippedTests['testDeferredSaveWithoutCommit'] = 'Fails on HHVM';
}
if (!function_exists('apcu_fetch') || !ini_get('apc.enabled') || ('cli' === PHP_SAPI && !ini_get('apc.enable_cli'))) {
$this->markTestSkipped('APCu extension is required.');
}
return new ChainAdapter(array(new ArrayAdapter(), new ExternalAdapter(), new ApcuAdapter()));
return new ChainAdapter(array(new ArrayAdapter(), new ExternalAdapter(), new FilesystemAdapter(null)));
}
/**

View File

@ -33,7 +33,10 @@ class RedisAdapterTest extends CachePoolTest
public static function setupBeforeClass()
{
self::$redis = new \Redis();
self::$redis->connect('127.0.0.1');
if (!@self::$redis->connect('127.0.0.1')) {
$e = error_get_last();
self::markTestSkipped($e['message']);
}
self::$redis->select(1993);
}