Support for APCu caching

This commit is contained in:
Philipp Holzer 2019-04-20 17:37:57 +02:00
parent e9c230e109
commit 3ca8fa0e00
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
6 changed files with 217 additions and 2 deletions

View file

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

View file

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