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:
Philipp Holzer 2018-07-07 16:15:03 +02:00
parent e719a25082
commit 1ffe0cfd81
No known key found for this signature in database
GPG key ID: 58160D7D6AF942B6
10 changed files with 114 additions and 70 deletions

View 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();
}
}