with:
php-version: ${{ matrix.php-versions }}
tools: pecl
- extensions: pdo_mysql, gd, zip, opcache, ctype, pcntl, ldap, apcu, memcached, redis, imagick
+ extensions: pdo_mysql, gd, zip, opcache, ctype, pcntl, ldap, apcu, memcached, redis, imagick, memcache
coverage: xdebug
ini-values: apc.enabled=1, apc.enable_cli=1
MYSQL_DATABASE: test
MYSQL_PASSWORD: test
MYSQL_USER: test
+ REDIS_PORT: ${{ job.services.redis.ports[6379] }}
+ MEMCACHED_PORT: ${{ job.services.memcached.ports[11211] }}
+ MEMCACHE_PORT: ${{ job.services.memcached.ports[11211] }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
$configMock = \Mockery::mock(IConfig::class);
$host = $_SERVER['MEMCACHE_HOST'] ?? 'localhost';
+ $port = $_SERVER['MEMCACHE_PORT'] ?? '11211';
$configMock
->shouldReceive('get')
$configMock
->shouldReceive('get')
->with('system', 'memcache_port')
- ->andReturn(11211);
+ ->andReturn($port);
try {
$this->cache = new MemcacheCache($host, $configMock);
$configMock = \Mockery::mock(IConfig::class);
$host = $_SERVER['MEMCACHED_HOST'] ?? 'localhost';
+ $port = $_SERVER['MEMCACHED_PORT'] ?? '11211';
$configMock
->shouldReceive('get')
->with('system', 'memcached_hosts')
- ->andReturn([0 => $host . ', 11211']);
+ ->andReturn([0 => $host . ', ' . $port]);
$logger = new NullLogger();
$configMock = \Mockery::mock(IConfig::class);
$host = $_SERVER['REDIS_HOST'] ?? 'localhost';
+ $port = $_SERVER['REDIS_PORT'] ?? null;
$configMock
->shouldReceive('get')
$configMock
->shouldReceive('get')
->with('system', 'redis_port')
- ->andReturn(null);
+ ->andReturn($port);
$configMock
->shouldReceive('get')
$configMock = \Mockery::mock(IConfig::class);
$host = $_SERVER['MEMCACHE_HOST'] ?? 'localhost';
+ $port = $_SERVER['MEMCACHE_PORT'] ?? '11211';
$configMock
->shouldReceive('get')
$configMock
->shouldReceive('get')
->with('system', 'memcache_port')
- ->andReturn(11211);
+ ->andReturn($port);
$lock = null;
$configMock = \Mockery::mock(IConfig::class);
$host = $_SERVER['MEMCACHED_HOST'] ?? 'localhost';
+ $port = $_SERVER['MEMCACHED_PORT'] ?? '11211';
$configMock
->shouldReceive('get')
->with('system', 'memcached_hosts')
- ->andReturn([0 => $host . ', 11211']);
+ ->andReturn([0 => $host . ', ' . $port]);
$logger = new NullLogger();
$configMock = \Mockery::mock(IConfig::class);
$host = $_SERVER['REDIS_HOST'] ?? 'localhost';
+ $port = $_SERVER['REDIS_PORT'] ?? null;
$configMock
->shouldReceive('get')
$configMock
->shouldReceive('get')
->with('system', 'redis_port')
- ->andReturn(null);
+ ->andReturn($port);
$configMock
->shouldReceive('get')