mirror of
https://github.com/friendica/friendica
synced 2025-04-21 14:30:12 +00: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
|
@ -16,15 +16,26 @@ class MemcacheCacheLockTest extends LockTest
|
|||
{
|
||||
$configMock = \Mockery::mock(Configuration::class);
|
||||
|
||||
$host = $_SERVER['MEMCACHE_HOST'] ?? 'localhost';
|
||||
|
||||
$configMock
|
||||
->shouldReceive('get')
|
||||
->with('system', 'memcache_host')
|
||||
->andReturn('localhost');
|
||||
->andReturn($host);
|
||||
$configMock
|
||||
->shouldReceive('get')
|
||||
->with('system', 'memcache_port')
|
||||
->andReturn(11211);
|
||||
|
||||
return new CacheLock(new MemcacheCache('localhost', $configMock));
|
||||
$lock = null;
|
||||
|
||||
try {
|
||||
$cache = new MemcacheCache($host, $configMock);
|
||||
$lock = new CacheLock($cache);
|
||||
} catch (\Exception $e) {
|
||||
$this->markTestSkipped('Memcache is not available');
|
||||
}
|
||||
|
||||
return $lock;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue