From: Philipp Date: Tue, 21 Feb 2023 20:01:40 +0000 (+0100) Subject: Fix API tests without addon table X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7e92adef6c37b0f19f1660f9e7c276972a00b9b1;p=friendica.git Fix API tests without addon table --- diff --git a/tests/src/Module/Api/ApiTest.php b/tests/src/Module/Api/ApiTest.php index 90dfa30b0a..812993aa98 100644 --- a/tests/src/Module/Api/ApiTest.php +++ b/tests/src/Module/Api/ApiTest.php @@ -24,6 +24,7 @@ namespace Friendica\Test\src\Module\Api; use Friendica\App; use Friendica\Capabilities\ICanCreateResponses; use Friendica\Core\Addon; +use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Hook; use Friendica\Database\Database; use Friendica\DI; @@ -212,15 +213,14 @@ abstract class ApiTest extends FixtureTest $func(DI::app()); } - /** @var Database $dba */ - $dba = $this->dice->create(Database::class); + /** @var $config IManageConfigValues */ + $config = $this->dice->create(IManageConfigValues::class); - $dba->insert('addon', [ + $config->set('addons', $addon, [ 'name' => $addon, 'installed' => true, 'timestamp' => $t, 'plugin_admin' => function_exists($addon . '_addon_admin'), - 'hidden' => file_exists('addon/' . $addon . '/.hidden') ]); Addon::loadAddons();