Skip memcache tests, see if we fix redis tests
This commit is contained in:
parent
e30f461642
commit
2bb9c1fb67
@ -40,12 +40,10 @@ class RedisDriver extends AbstractDriver {
|
||||
*/
|
||||
public function __construct(array $config = [], array $options = [])
|
||||
{
|
||||
// @codeCoverageIgnoreStart
|
||||
if ( ! class_exists('Predis\\Client'))
|
||||
{
|
||||
throw new CacheException("The redis driver requires the predis/predis composer package to be installed.");
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
$this->conn = new Client($config, $options);
|
||||
}
|
||||
|
@ -17,10 +17,13 @@
|
||||
namespace Aviat\Banker\Tests\Driver;
|
||||
|
||||
use Aviat\Banker\Driver\MemcacheDriver;
|
||||
use Aviat\Banker\Exception\CacheException;
|
||||
|
||||
class MemcacheDriverTest extends DriverTestBase {
|
||||
|
||||
public function setup()
|
||||
{
|
||||
try
|
||||
{
|
||||
$this->driver = new MemcacheDriver([
|
||||
'host' => 'localhost',
|
||||
@ -29,4 +32,9 @@ class MemcacheDriverTest extends DriverTestBase {
|
||||
]);
|
||||
$this->driver->flush();
|
||||
}
|
||||
catch (CacheException $e)
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,15 @@ class RedisDriverTest extends DriverTestBase {
|
||||
|
||||
public function setup()
|
||||
{
|
||||
$this->driver = new RedisDriver();
|
||||
$config = [];
|
||||
if (array_key_exists('REDIS_HOST', $_ENV))
|
||||
{
|
||||
$config['scheme'] = 'tcp';
|
||||
$config['host'] = $_ENV['REDIS_HOST'];
|
||||
$config['port'] = 6379;
|
||||
}
|
||||
|
||||
$this->driver = new RedisDriver($config);
|
||||
$this->driver->flush();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user