Add memory session for API tests

pull/7907/head
nupplaPhil 2019-12-10 22:56:56 +01:00
rodzic b9f8762eb3
commit af1299c697
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: D8365C3D36B77D90
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -11,6 +11,7 @@ use Friendica\BaseObject;
use Friendica\Core\Config\Configuration;
use Friendica\Core\Config\PConfiguration;
use Friendica\Core\Protocol;
use Friendica\Core\Session;
use Friendica\Core\Session\ISession;
use Friendica\Core\System;
use Friendica\Database\Database;
@ -60,7 +61,8 @@ class ApiTest extends DatabaseTest
$this->dice = (new Dice())
->addRules(include __DIR__ . '/../../static/dependencies.config.php')
->addRule(Database::class, ['instanceOf' => StaticDatabase::class, 'shared' => true]);
->addRule(Database::class, ['instanceOf' => StaticDatabase::class, 'shared' => true])
->addRule(ISession::class, ['instanceOf' => Session\Memory::class, 'shared' => true]);
BaseObject::setDependencyInjection($this->dice);
/** @var Database $dba */