From: nupplaPhil Date: Tue, 10 Dec 2019 21:56:56 +0000 (+0100) Subject: Add memory session for API tests X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=af1299c69758594b0e36f55b1a431f9531be23d3;p=friendica.git Add memory session for API tests --- diff --git a/tests/include/ApiTest.php b/tests/include/ApiTest.php index 1419f7d7fe..63e8d23453 100644 --- a/tests/include/ApiTest.php +++ b/tests/include/ApiTest.php @@ -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 */