]> git.mxchange.org Git - friendica.git/commitdiff
Add memory session for API tests
authornupplaPhil <admin@philipp.info>
Tue, 10 Dec 2019 21:56:56 +0000 (22:56 +0100)
committernupplaPhil <admin@philipp.info>
Tue, 10 Dec 2019 21:56:56 +0000 (22:56 +0100)
tests/include/ApiTest.php

index 1419f7d7fe0730488bad3aba1c4f90fd943fdfb5..63e8d23453c90f4152da0c178ad4b86dd5354535 100644 (file)
@@ -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 */