mirror of
https://github.com/friendica/friendica
synced 2024-12-22 08:00:16 +00:00
Rename MemoryCacheTest to MemoryCacheTestCase
This commit is contained in:
parent
0826cb50bd
commit
a676e738e0
6 changed files with 13 additions and 9 deletions
|
@ -5,13 +5,12 @@
|
|||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
namespace Friendica\Test\src\Core\Cache;
|
||||
namespace Friendica\Test;
|
||||
|
||||
use Exception;
|
||||
use Friendica\Core\Cache\Capability\ICanCacheInMemory;
|
||||
use Friendica\Test\CacheTestCase;
|
||||
|
||||
abstract class MemoryCacheTest extends CacheTestCase
|
||||
abstract class MemoryCacheTestCase extends CacheTestCase
|
||||
{
|
||||
/**
|
||||
* @var \Friendica\Core\Cache\Capability\ICanCacheInMemory
|
|
@ -8,11 +8,12 @@
|
|||
namespace Friendica\Test\src\Core\Cache;
|
||||
|
||||
use Friendica\Core\Cache\Type\APCuCache;
|
||||
use Friendica\Test\MemoryCacheTestCase;
|
||||
|
||||
/**
|
||||
* @group APCU
|
||||
*/
|
||||
class APCuCacheTest extends MemoryCacheTest
|
||||
class APCuCacheTest extends MemoryCacheTestCase
|
||||
{
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
|
|
@ -8,8 +8,9 @@
|
|||
namespace Friendica\Test\src\Core\Cache;
|
||||
|
||||
use Friendica\Core\Cache\Type\ArrayCache;
|
||||
use Friendica\Test\MemoryCacheTestCase;
|
||||
|
||||
class ArrayCacheTest extends MemoryCacheTest
|
||||
class ArrayCacheTest extends MemoryCacheTestCase
|
||||
{
|
||||
protected function getInstance()
|
||||
{
|
||||
|
|
|
@ -10,13 +10,14 @@ namespace Friendica\Test\src\Core\Cache;
|
|||
use Exception;
|
||||
use Friendica\Core\Cache\Type\MemcacheCache;
|
||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Test\MemoryCacheTestCase;
|
||||
use Mockery;
|
||||
|
||||
/**
|
||||
* @requires extension memcache
|
||||
* @group MEMCACHE
|
||||
*/
|
||||
class MemcacheCacheTest extends MemoryCacheTest
|
||||
class MemcacheCacheTest extends MemoryCacheTestCase
|
||||
{
|
||||
protected function getInstance()
|
||||
{
|
||||
|
|
|
@ -10,6 +10,7 @@ namespace Friendica\Test\src\Core\Cache;
|
|||
use Exception;
|
||||
use Friendica\Core\Cache\Type\MemcachedCache;
|
||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Test\MemoryCacheTestCase;
|
||||
use Mockery;
|
||||
use Psr\Log\NullLogger;
|
||||
|
||||
|
@ -17,7 +18,7 @@ use Psr\Log\NullLogger;
|
|||
* @requires extension memcached
|
||||
* @group MEMCACHED
|
||||
*/
|
||||
class MemcachedCacheTest extends MemoryCacheTest
|
||||
class MemcachedCacheTest extends MemoryCacheTestCase
|
||||
{
|
||||
protected function getInstance()
|
||||
{
|
||||
|
|
|
@ -10,13 +10,14 @@ namespace Friendica\Test\src\Core\Cache;
|
|||
use Exception;
|
||||
use Friendica\Core\Cache\Type\RedisCache;
|
||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Test\MemoryCacheTestCase;
|
||||
use Mockery;
|
||||
|
||||
/**
|
||||
* @requires extension redis
|
||||
* @group REDIS
|
||||
*/
|
||||
class RedisCacheTest extends MemoryCacheTest
|
||||
class RedisCacheTest extends MemoryCacheTestCase
|
||||
{
|
||||
protected function getInstance()
|
||||
{
|
||||
|
@ -44,7 +45,7 @@ class RedisCacheTest extends MemoryCacheTest
|
|||
->andReturn(null);
|
||||
|
||||
try {
|
||||
$this->cache = new \Friendica\Core\Cache\Type\RedisCache($host, $configMock);
|
||||
$this->cache = new RedisCache($host, $configMock);
|
||||
} catch (Exception $e) {
|
||||
static::markTestSkipped('Redis is not available. Failure: ' . $e->getMessage());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue