mirror of
https://github.com/friendica/friendica
synced 2025-04-29 21:44:23 +02:00
Added Lock Unittests & Bugfixings
Added Redis Lock Unittests Added Memcached Lock Unittests Fixed a bug in dba Fixed a bug in RedisLock
This commit is contained in:
parent
e719a25082
commit
1ffe0cfd81
10 changed files with 114 additions and 70 deletions
27
tests/src/Core/Lock/ArrayCacheLockDriverTest.php
Normal file
27
tests/src/Core/Lock/ArrayCacheLockDriverTest.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace Friendica\Test\src\Core\Lock;
|
||||
|
||||
|
||||
use Friendica\Core\Cache\ArrayCache;
|
||||
use Friendica\Core\Lock\CacheLockDriver;
|
||||
|
||||
class ArrayCacheLockDriverTest extends LockTest
|
||||
{
|
||||
/**
|
||||
* @var \Friendica\Core\Cache\IMemoryCacheDriver
|
||||
*/
|
||||
private $cache;
|
||||
|
||||
protected function getInstance()
|
||||
{
|
||||
$this->cache = new ArrayCache();
|
||||
return new CacheLockDriver($this->cache);
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
{
|
||||
$this->cache->clear();
|
||||
parent::tearDown();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue