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:
commit
85506a0cbe
@ -12,7 +12,7 @@
|
|||||||
namespace Symfony\Component\Cache\Tests\Adapter;
|
namespace Symfony\Component\Cache\Tests\Adapter;
|
||||||
|
|
||||||
use Cache\IntegrationTests\CachePoolTest;
|
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\ArrayAdapter;
|
||||||
use Symfony\Component\Cache\Adapter\ChainAdapter;
|
use Symfony\Component\Cache\Adapter\ChainAdapter;
|
||||||
use Symfony\Component\Cache\Tests\Fixtures\ExternalAdapter;
|
use Symfony\Component\Cache\Tests\Fixtures\ExternalAdapter;
|
||||||
@ -27,11 +27,8 @@ class ChainAdapterTest extends CachePoolTest
|
|||||||
if (defined('HHVM_VERSION')) {
|
if (defined('HHVM_VERSION')) {
|
||||||
$this->skippedTests['testDeferredSaveWithoutCommit'] = 'Fails on HHVM';
|
$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)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -33,7 +33,10 @@ class RedisAdapterTest extends CachePoolTest
|
|||||||
public static function setupBeforeClass()
|
public static function setupBeforeClass()
|
||||||
{
|
{
|
||||||
self::$redis = new \Redis();
|
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);
|
self::$redis->select(1993);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user