Refactor ConfigMockTrait to mocked ConfigCache
This commit is contained in:
@@ -6,15 +6,16 @@ namespace Friendica\Test\src\Core\Cache;
|
||||
use Friendica\Core\Cache\CacheDriverFactory;
|
||||
|
||||
/**
|
||||
* @runTestsInSeparateProcesses
|
||||
* @preserveGlobalState disabled
|
||||
* @requires extension memcached
|
||||
*/
|
||||
class MemcachedCacheDriverTest extends MemoryCacheTest
|
||||
{
|
||||
protected function getInstance()
|
||||
{
|
||||
$this->mockConfigGet('system', 'memcached_hosts', [0 => 'localhost, 11211']);
|
||||
$this->configCache
|
||||
->shouldReceive('get')
|
||||
->with('system', 'memcached_hosts', NULL)
|
||||
->andReturn([0 => 'localhost, 11211']);
|
||||
|
||||
$this->cache = CacheDriverFactory::create('memcached');
|
||||
return $this->cache;
|
||||
|
||||
Reference in New Issue
Block a user