mirror of
https://github.com/friendica/friendica
synced 2025-04-27 18:30:12 +00:00
Shorten "Configuration" to "Config" again, since the Wrapper is gone
This commit is contained in:
parent
21640ec5d8
commit
cb80108957
53 changed files with 183 additions and 179 deletions
|
@ -3,7 +3,7 @@
|
|||
namespace Friendica\Test\src\Core\Cache;
|
||||
|
||||
use Friendica\Core\Cache\MemcacheCache;
|
||||
use Friendica\Core\Config\IConfiguration;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
|
||||
/**
|
||||
* @requires extension memcache
|
||||
|
@ -13,7 +13,7 @@ class MemcacheCacheTest extends MemoryCacheTest
|
|||
{
|
||||
protected function getInstance()
|
||||
{
|
||||
$configMock = \Mockery::mock(IConfiguration::class);
|
||||
$configMock = \Mockery::mock(IConfig::class);
|
||||
|
||||
$host = $_SERVER['MEMCACHE_HOST'] ?? 'localhost';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
namespace Friendica\Test\src\Core\Cache;
|
||||
|
||||
use Friendica\Core\Cache\MemcachedCache;
|
||||
use Friendica\Core\Config\IConfiguration;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Psr\Log\NullLogger;
|
||||
|
||||
/**
|
||||
|
@ -15,7 +15,7 @@ class MemcachedCacheTest extends MemoryCacheTest
|
|||
{
|
||||
protected function getInstance()
|
||||
{
|
||||
$configMock = \Mockery::mock(IConfiguration::class);
|
||||
$configMock = \Mockery::mock(IConfig::class);
|
||||
|
||||
$host = $_SERVER['MEMCACHED_HOST'] ?? 'localhost';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
namespace Friendica\Test\src\Core\Cache;
|
||||
|
||||
use Friendica\Core\Cache\RedisCache;
|
||||
use Friendica\Core\Config\IConfiguration;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
|
||||
/**
|
||||
* @requires extension redis
|
||||
|
@ -14,7 +14,7 @@ class RedisCacheTest extends MemoryCacheTest
|
|||
{
|
||||
protected function getInstance()
|
||||
{
|
||||
$configMock = \Mockery::mock(IConfiguration::class);
|
||||
$configMock = \Mockery::mock(IConfig::class);
|
||||
|
||||
$host = $_SERVER['REDIS_HOST'] ?? 'localhost';
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace Friendica\Test\src\Core\Config;
|
||||
|
||||
use Friendica\Core\Config\Cache\ConfigCache;
|
||||
use Friendica\Core\Config\IConfiguration;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Friendica\Model\Config\Config as ConfigModel;
|
||||
use Friendica\Test\MockedTest;
|
||||
use Mockery\MockInterface;
|
||||
|
@ -17,7 +17,7 @@ abstract class ConfigurationTest extends MockedTest
|
|||
/** @var ConfigCache */
|
||||
protected $configCache;
|
||||
|
||||
/** @var IConfiguration */
|
||||
/** @var IConfig */
|
||||
protected $testedConfig;
|
||||
|
||||
/**
|
||||
|
@ -46,7 +46,7 @@ abstract class ConfigurationTest extends MockedTest
|
|||
}
|
||||
|
||||
/**
|
||||
* @return IConfiguration
|
||||
* @return IConfig
|
||||
*/
|
||||
public abstract function getInstance();
|
||||
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
namespace Friendica\Test\src\Core\Config;
|
||||
|
||||
use Friendica\Core\Config\JitConfiguration;
|
||||
use Friendica\Core\Config\JitConfig;
|
||||
|
||||
class JitConfigurationTest extends ConfigurationTest
|
||||
{
|
||||
public function getInstance()
|
||||
{
|
||||
return new JitConfiguration($this->configCache, $this->configModel);
|
||||
return new JitConfig($this->configCache, $this->configModel);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
namespace Friendica\Test\src\Core\Config;
|
||||
|
||||
use Friendica\Core\Config\PreloadConfiguration;
|
||||
use Friendica\Core\Config\PreloadConfig;
|
||||
|
||||
class PreloadConfigurationTest extends ConfigurationTest
|
||||
{
|
||||
public function getInstance()
|
||||
{
|
||||
return new PreloadConfiguration($this->configCache, $this->configModel);
|
||||
return new PreloadConfig($this->configCache, $this->configModel);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
namespace Friendica\Test\src\Core\Lock;
|
||||
|
||||
use Friendica\Core\Cache\MemcacheCache;
|
||||
use Friendica\Core\Config\IConfiguration;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Friendica\Core\Lock\CacheLock;
|
||||
|
||||
/**
|
||||
|
@ -15,7 +15,7 @@ class MemcacheCacheLockTest extends LockTest
|
|||
{
|
||||
protected function getInstance()
|
||||
{
|
||||
$configMock = \Mockery::mock(IConfiguration::class);
|
||||
$configMock = \Mockery::mock(IConfig::class);
|
||||
|
||||
$host = $_SERVER['MEMCACHE_HOST'] ?? 'localhost';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
namespace Friendica\Test\src\Core\Lock;
|
||||
|
||||
use Friendica\Core\Cache\MemcachedCache;
|
||||
use Friendica\Core\Config\IConfiguration;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Friendica\Core\Lock\CacheLock;
|
||||
use Psr\Log\NullLogger;
|
||||
|
||||
|
@ -16,7 +16,7 @@ class MemcachedCacheLockTest extends LockTest
|
|||
{
|
||||
protected function getInstance()
|
||||
{
|
||||
$configMock = \Mockery::mock(IConfiguration::class);
|
||||
$configMock = \Mockery::mock(IConfig::class);
|
||||
|
||||
$host = $_SERVER['MEMCACHED_HOST'] ?? 'localhost';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
namespace Friendica\Test\src\Core\Lock;
|
||||
|
||||
use Friendica\Core\Cache\RedisCache;
|
||||
use Friendica\Core\Config\IConfiguration;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Friendica\Core\Lock\CacheLock;
|
||||
|
||||
/**
|
||||
|
@ -15,7 +15,7 @@ class RedisCacheLockTest extends LockTest
|
|||
{
|
||||
protected function getInstance()
|
||||
{
|
||||
$configMock = \Mockery::mock(IConfiguration::class);
|
||||
$configMock = \Mockery::mock(IConfig::class);
|
||||
|
||||
$host = $_SERVER['REDIS_HOST'] ?? 'localhost';
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ namespace Friendica\Test\src\Core\Lock;
|
|||
|
||||
use Dice\Dice;
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config\IConfiguration;
|
||||
use Friendica\Core\Config\JitConfiguration;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Friendica\Core\Config\JitConfig;
|
||||
use Friendica\Core\Lock\SemaphoreLock;
|
||||
use Friendica\DI;
|
||||
use Mockery\MockInterface;
|
||||
|
@ -21,12 +21,12 @@ class SemaphoreLockTest extends LockTest
|
|||
$app->shouldReceive('getHostname')->andReturn('friendica.local');
|
||||
$dice->shouldReceive('create')->with(App::class)->andReturn($app);
|
||||
|
||||
$configMock = \Mockery::mock(JitConfiguration::class);
|
||||
$configMock = \Mockery::mock(JitConfig::class);
|
||||
$configMock
|
||||
->shouldReceive('get')
|
||||
->with('system', 'temppath', NULL, false)
|
||||
->andReturn('/tmp/');
|
||||
$dice->shouldReceive('create')->with(IConfiguration::class)->andReturn($configMock);
|
||||
$dice->shouldReceive('create')->with(IConfig::class)->andReturn($configMock);
|
||||
|
||||
// @todo Because "get_temppath()" is using static methods, we have to initialize the BaseObject
|
||||
DI::init($dice);
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
namespace Friendica\Test\src\Core;
|
||||
|
||||
use Dice\Dice;
|
||||
use Friendica\Core\Config\IConfiguration;
|
||||
use Friendica\Core\Config\PreloadConfiguration;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Friendica\Core\Config\PreloadConfig;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Session\ISession;
|
||||
|
@ -28,7 +28,7 @@ class StorageManagerTest extends DatabaseTest
|
|||
{
|
||||
/** @var Database */
|
||||
private $dba;
|
||||
/** @var IConfiguration */
|
||||
/** @var IConfig */
|
||||
private $config;
|
||||
/** @var LoggerInterface */
|
||||
private $logger;
|
||||
|
@ -56,7 +56,7 @@ class StorageManagerTest extends DatabaseTest
|
|||
$this->dba = new StaticDatabase($configCache, $profiler, $this->logger);
|
||||
|
||||
$configModel = new Config($this->dba);
|
||||
$this->config = new PreloadConfiguration($configCache, $configModel);
|
||||
$this->config = new PreloadConfig($configCache, $configModel);
|
||||
|
||||
$this->l10n = \Mockery::mock(L10n::class);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue