mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-08 02:54:27 +02:00
Add a bunch of tests for StatsCaching
This commit is contained in:
parent
892fa595da
commit
b222aa0c48
15 changed files with 477 additions and 43 deletions
|
@ -7,15 +7,32 @@
|
|||
|
||||
namespace Friendica\Test\src\Core\Lock;
|
||||
|
||||
use Friendica\Core\Cache\Capability\ICanCacheInMemory;
|
||||
use Friendica\Core\Cache\Type\ArrayCache;
|
||||
use Friendica\Core\Lock\Type\CacheLock;
|
||||
use Friendica\Test\LockTestCase;
|
||||
use Friendica\Test\CacheLockTestCase;
|
||||
|
||||
class ArrayCacheLockTest extends LockTestCase
|
||||
class ArrayCacheLockTest extends CacheLockTestCase
|
||||
{
|
||||
protected function getInstance()
|
||||
private CacheLock $lock;
|
||||
private ArrayCache $cache;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
return new CacheLock(new ArrayCache('localhost'));
|
||||
$this->cache = new ArrayCache('localhost');
|
||||
$this->lock = new CacheLock($this->cache);
|
||||
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
protected function getInstance(): CacheLock
|
||||
{
|
||||
return $this->lock;
|
||||
}
|
||||
|
||||
protected function getCache(): ICanCacheInMemory
|
||||
{
|
||||
return $this->cache;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue