Support for APCu caching
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Friendica\Test\src\Core\Cache;
|
||||
|
||||
use Friendica\Core\Cache\APCuCache;
|
||||
|
||||
class APCuCacheDriverTest extends MemoryCacheTest
|
||||
{
|
||||
protected function setUp()
|
||||
{
|
||||
if (!APCuCache::isAvailable()) {
|
||||
$this->markTestSkipped('APCu is not available');
|
||||
}
|
||||
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
protected function getInstance()
|
||||
{
|
||||
$this->cache = new APCuCache();
|
||||
return $this->cache;
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
{
|
||||
$this->cache->clear(false);
|
||||
parent::tearDown();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Friendica\Test\src\Core\Lock;
|
||||
|
||||
|
||||
use Friendica\Core\Cache\APCuCache;
|
||||
use Friendica\Core\Lock\CacheLockDriver;
|
||||
|
||||
class APCuCacheLockDriverTest extends LockTest
|
||||
{
|
||||
protected function getInstance()
|
||||
{
|
||||
return new CacheLockDriver(new APCuCache());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user