Add a bunch of tests for StatsCaching

This commit is contained in:
Philipp 2025-04-27 01:36:30 +02:00
parent 892fa595da
commit b222aa0c48
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
15 changed files with 477 additions and 43 deletions

View file

@ -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;
}
/**