mirror of
https://github.com/friendica/friendica
synced 2025-04-27 00:30:10 +00:00
Make Storage testable & add tests
- Making StorageManager dynamic (DI::facStorage()) - Making concrete Storage dynamic (DI::storage()) - Add tests for Storage backend and failure handling - Bumping Level-2/Dice to "dev-master" until new release - Using Storage-Names instead of Storage-Classes in config (includes migration)
This commit is contained in:
parent
a5895f8623
commit
08edeae2f9
18 changed files with 744 additions and 242 deletions
|
@ -8,8 +8,10 @@ use Friendica\Core\L10n\L10n;
|
|||
use Friendica\Core\Lock\ILock;
|
||||
use Friendica\Core\Process;
|
||||
use Friendica\Core\Session\ISession;
|
||||
use Friendica\Core\StorageManager;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Factory;
|
||||
use Friendica\Model\Storage\IStorage;
|
||||
use Friendica\Model\User\Cookie;
|
||||
use Friendica\Util;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
@ -193,5 +195,19 @@ return [
|
|||
'constructParams' => [
|
||||
$_SERVER, $_COOKIE
|
||||
],
|
||||
]
|
||||
],
|
||||
StorageManager::class => [
|
||||
'constructParams' => [
|
||||
[Dice::INSTANCE => Dice::SELF],
|
||||
]
|
||||
],
|
||||
IStorage::class => [
|
||||
// Don't share this class with other creations, because it's possible to switch the backend
|
||||
// and so we wouldn't be possible to update it
|
||||
'shared' => false,
|
||||
'instanceOf' => StorageManager::class,
|
||||
'call' => [
|
||||
['getBackend', [], Dice::CHAIN_CALL],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue