mirror of
https://github.com/friendica/friendica
synced 2025-04-28 23:44:23 +02:00
Added Unittests for cache
fixed Lock & Cache bugs
This commit is contained in:
parent
1dafaa69c5
commit
80a4e6263f
18 changed files with 317 additions and 25 deletions
32
tests/src/Core/Cache/ArrayCacheDriverTest.php
Normal file
32
tests/src/Core/Cache/ArrayCacheDriverTest.php
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace Friendica\Test\src\Core\Cache;
|
||||
|
||||
|
||||
use Friendica\Core\Cache\ArrayCache;
|
||||
|
||||
class ArrayCacheDriverTest extends CacheTest
|
||||
{
|
||||
/**
|
||||
* @var \Friendica\Core\Cache\IMemoryCacheDriver
|
||||
*/
|
||||
private $cache;
|
||||
|
||||
protected function getInstance()
|
||||
{
|
||||
$this->cache = new ArrayCache();
|
||||
return $this->cache;
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
{
|
||||
$this->cache->clear();
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
public function testTTL()
|
||||
{
|
||||
// Array Cache doesn't support TTL
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue