mirror of
https://github.com/friendica/friendica
synced 2025-04-22 13:50:12 +00:00
Refactor Cache/Lock to DICE
- Refactor Cache classes - Refactor Lock classes - Improved test speed (removed some seperate class annotations)
This commit is contained in:
parent
b95d4f41b9
commit
d56bd28a07
40 changed files with 766 additions and 621 deletions
|
@ -3,7 +3,9 @@
|
|||
|
||||
namespace Friendica\Test\src\Core\Cache;
|
||||
|
||||
use Friendica\Factory\CacheDriverFactory;
|
||||
use Friendica\Core\Cache\MemcachedCacheDriver;
|
||||
use Friendica\Core\Config\Configuration;
|
||||
use Psr\Log\NullLogger;
|
||||
|
||||
/**
|
||||
* @requires extension memcached
|
||||
|
@ -12,12 +14,16 @@ class MemcachedCacheDriverTest extends MemoryCacheTest
|
|||
{
|
||||
protected function getInstance()
|
||||
{
|
||||
$this->configMock
|
||||
$configMock = \Mockery::mock(Configuration::class);
|
||||
|
||||
$configMock
|
||||
->shouldReceive('get')
|
||||
->with('system', 'memcached_hosts')
|
||||
->andReturn([0 => 'localhost, 11211']);
|
||||
|
||||
$this->cache = CacheDriverFactory::create('memcached');
|
||||
$logger = new NullLogger();
|
||||
|
||||
$this->cache = new MemcachedCacheDriver('localhost', $configMock, $logger);
|
||||
return $this->cache;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue