Refactor ConfigMockTrait to mocked ConfigCache

This commit is contained in:
Philipp Holzer 2019-02-07 20:44:03 +01:00
parent 38ac615ba0
commit cb791024e4
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
27 changed files with 244 additions and 193 deletions

View file

@ -8,14 +8,15 @@ use Friendica\Core\Lock\CacheLockDriver;
/**
* @requires extension memcached
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
*/
class MemcachedCacheLockDriverTest extends LockTest
{
protected function getInstance()
{
$this->mockConfigGet('system', 'memcached_hosts', [0 => 'localhost, 11211']);
$this->configCache
->shouldReceive('get')
->with('system', 'memcached_hosts', NULL)
->andReturn([0 => 'localhost, 11211']);
return new CacheLockDriver(CacheDriverFactory::create('memcached'));
}