mirror of
https://github.com/friendica/friendica
synced 2025-09-05 19:58:31 +02:00
Adding possibility to use a different cache-backend for locking and caching
- Renaming *LockDriver to *Lock since it isn't a "driver" anymore
This commit is contained in:
parent
86bf2ee45a
commit
34e4968c06
19 changed files with 149 additions and 64 deletions
|
@ -4,8 +4,11 @@ namespace functional;
|
|||
|
||||
use Dice\Dice;
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Cache\ICache;
|
||||
use Friendica\Core\Cache\IMemoryCache;
|
||||
use Friendica\Core\Config\Cache\ConfigCache;
|
||||
use Friendica\Core\Config\Configuration;
|
||||
use Friendica\Core\Lock\ILock;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Test\Util\VFSTrait;
|
||||
use Friendica\Util\BasePath;
|
||||
|
@ -133,6 +136,31 @@ class dependencyCheck extends TestCase
|
|||
/** @var LoggerInterface $logger */
|
||||
$logger = $this->dice->create('$devLogger', ['dev']);
|
||||
|
||||
self::assertInstanceOf(LoggerInterface::class, $logger);
|
||||
$this->assertInstanceOf(LoggerInterface::class, $logger);
|
||||
}
|
||||
|
||||
public function testCache()
|
||||
{
|
||||
/** @var ICache $cache */
|
||||
$cache = $this->dice->create(ICache::class);
|
||||
|
||||
$this->assertInstanceOf(ICache::class, $cache);
|
||||
}
|
||||
|
||||
public function testMemoryCache()
|
||||
{
|
||||
/** @var IMemoryCache $cache */
|
||||
$cache = $this->dice->create(IMemoryCache::class);
|
||||
|
||||
// We need to check "just" ICache, because the default Cache is DB-Cache, which isn't a memorycache
|
||||
$this->assertInstanceOf(ICache::class, $cache);
|
||||
}
|
||||
|
||||
public function testLock()
|
||||
{
|
||||
/** @var ILock $cache */
|
||||
$lock = $this->dice->create(ILock::class);
|
||||
|
||||
$this->assertInstanceOf(ILock::class, $lock);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue