mirror of
https://github.com/friendica/friendica
synced 2025-04-22 01:50:11 +00:00
Refactor ConfigMockTrait to mocked ConfigCache
This commit is contained in:
parent
38ac615ba0
commit
cb791024e4
27 changed files with 244 additions and 193 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue