mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-08 05:34:27 +02:00
Add Drone CI
- Add drone test environment - Add drone config - apt phpunit - Fix api.php - Fix item.php - Fix DBStructure - Check if caching is possible during tests
This commit is contained in:
parent
b51dedd7e7
commit
d5dd12b8f8
19 changed files with 321 additions and 34 deletions
|
@ -17,13 +17,24 @@ class MemcachedCacheLockTest extends LockTest
|
|||
{
|
||||
$configMock = \Mockery::mock(Configuration::class);
|
||||
|
||||
$host = $_SERVER['MEMCACHED_HOST'] ?? 'localhost';
|
||||
|
||||
$configMock
|
||||
->shouldReceive('get')
|
||||
->with('system', 'memcached_hosts')
|
||||
->andReturn([0 => 'localhost, 11211']);
|
||||
->andReturn([0 => $host . ', 11211']);
|
||||
|
||||
$logger = new NullLogger();
|
||||
|
||||
return new CacheLock(new MemcachedCache('localhost', $configMock, $logger));
|
||||
$lock = null;
|
||||
|
||||
try {
|
||||
$cache = new MemcachedCache($host, $configMock, $logger);
|
||||
$lock = new CacheLock($cache);
|
||||
} catch (\Exception $e) {
|
||||
$this->markTestSkipped('Memcached is not available');
|
||||
}
|
||||
|
||||
return $lock;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue