mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-08 07:18:17 +02: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
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Friendica\Test\src\Core\Cache;
|
||||
|
||||
use Friendica\Factory\CacheDriverFactory;
|
||||
use Friendica\Core\Cache\MemcacheCacheDriver;
|
||||
use Friendica\Core\Config\Configuration;
|
||||
|
||||
/**
|
||||
* @requires extension memcache
|
||||
|
@ -12,19 +12,19 @@ class MemcacheCacheDriverTest extends MemoryCacheTest
|
|||
{
|
||||
protected function getInstance()
|
||||
{
|
||||
$this->configMock
|
||||
$configMock = \Mockery::mock(Configuration::class);
|
||||
|
||||
$configMock
|
||||
->shouldReceive('get')
|
||||
->with('system', 'memcache_host')
|
||||
->andReturn('localhost');
|
||||
|
||||
$this->configMock
|
||||
$configMock
|
||||
->shouldReceive('get')
|
||||
->with('system', 'memcache_port')
|
||||
->andReturn(11211);
|
||||
|
||||
$this->cache = CacheDriverFactory::create('memcache');
|
||||
$this->cache = new MemcacheCacheDriver('localhost', $configMock);
|
||||
return $this->cache;
|
||||
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue