mirror of
https://github.com/friendica/friendica
synced 2025-04-25 09:10:11 +00:00
Refactoring Core class structures ...
This commit is contained in:
parent
57b4c008cb
commit
b216317477
130 changed files with 1625 additions and 1397 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Friendica\Test\src\Model;
|
||||
|
||||
use Friendica\Core\Config\Factory\ConfigFactory;
|
||||
use Friendica\Core\Config\Factory\Config;
|
||||
use Friendica\Model\Process;
|
||||
use Friendica\Test\DatabaseTest;
|
||||
use Friendica\Test\Util\Database\StaticDatabase;
|
||||
|
@ -31,8 +31,8 @@ class ProcessTest extends DatabaseTest
|
|||
$profiler->shouldReceive('saveTimestamp')->withAnyArgs()->andReturn(true);
|
||||
|
||||
// load real config to avoid mocking every config-entry which is related to the Database class
|
||||
$configFactory = new ConfigFactory();
|
||||
$loader = (new ConfigFactory())->createConfigFileLoader($this->root->url(), []);
|
||||
$configFactory = new Config();
|
||||
$loader = (new Config())->createConfigFileLoader($this->root->url(), []);
|
||||
$configCache = $configFactory->createCache($loader);
|
||||
|
||||
$this->dba = new StaticDatabase($configCache, $profiler, $logger);
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
namespace Friendica\Test\src\Model\Storage;
|
||||
|
||||
use Friendica\Core\Config\Factory\ConfigFactory;
|
||||
use Friendica\Core\Config\Factory\Config;
|
||||
use Friendica\Model\Storage\Database;
|
||||
use Friendica\Test\DatabaseTestTrait;
|
||||
use Friendica\Test\Util\Database\StaticDatabase;
|
||||
|
@ -52,8 +52,8 @@ class DatabaseStorageTest extends StorageTest
|
|||
$profiler->shouldReceive('saveTimestamp')->withAnyArgs()->andReturn(true);
|
||||
|
||||
// load real config to avoid mocking every config-entry which is related to the Database class
|
||||
$configFactory = new ConfigFactory();
|
||||
$loader = (new ConfigFactory())->createConfigFileLoader($this->root->url(), []);
|
||||
$configFactory = new Config();
|
||||
$loader = (new Config())->createConfigFileLoader($this->root->url(), []);
|
||||
$configCache = $configFactory->createCache($loader);
|
||||
|
||||
$dba = new StaticDatabase($configCache, $profiler, $logger);
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
namespace Friendica\Test\src\Model\Storage;
|
||||
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Model\Storage\FilesystemConfig;
|
||||
use Friendica\Model\Storage\IStorageConfiguration;
|
||||
|
@ -46,7 +46,7 @@ class FilesystemStorageConfigTest extends StorageConfigTest
|
|||
{
|
||||
/** @var MockInterface|L10n $l10n */
|
||||
$l10n = \Mockery::mock(L10n::class)->makePartial();
|
||||
$config = \Mockery::mock(IConfig::class);
|
||||
$config = \Mockery::mock(IManageConfigValues::class);
|
||||
$config->shouldReceive('get')
|
||||
->with('storage', 'filesystem_path', FilesystemConfig::DEFAULT_BASE_FOLDER)
|
||||
->andReturn($this->root->getChild('storage')->url());
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
namespace Friendica\Test\src\Model\User;
|
||||
|
||||
use Friendica\App\BaseURL;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Model\User\Cookie;
|
||||
use Friendica\Test\MockedTest;
|
||||
use Friendica\Test\Util\StaticCookie;
|
||||
|
@ -30,7 +30,7 @@ use Mockery\MockInterface;
|
|||
|
||||
class CookieTest extends MockedTest
|
||||
{
|
||||
/** @var MockInterface|IConfig */
|
||||
/** @var MockInterface|\Friendica\Core\Config\Capability\IManageConfigValues */
|
||||
private $config;
|
||||
/** @var MockInterface|BaseURL */
|
||||
private $baseUrl;
|
||||
|
@ -41,7 +41,7 @@ class CookieTest extends MockedTest
|
|||
|
||||
parent::setUp();
|
||||
|
||||
$this->config = \Mockery::mock(IConfig::class);
|
||||
$this->config = \Mockery::mock(IManageConfigValues::class);
|
||||
$this->baseUrl = \Mockery::mock(BaseURL::class);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue