<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
$configMock = Mockery::mock(IConfig::class);
$host = $_SERVER['REDIS_HOST'] ?? 'localhost';
- $port = $_SERVER['REDIS_PORT'] ?? null;
+ $port = $_SERVER['REDIS_PORT'] ?? 6379;
$configMock
->shouldReceive('get')
$configMock
->shouldReceive('get')
->with('system', 'redis_db', 0)
- ->andReturn(3);
+ ->andReturn(0);
$configMock
->shouldReceive('get')
->with('system', 'redis_password')
$cache = new RedisCache($host, $configMock);
$lock = new CacheLock($cache);
} catch (Exception $e) {
- static::markTestSkipped('Redis is not available');
+ static::markTestSkipped('Redis is not available. Error: ' . $e->getMessage());
}
return $lock;