Fix API tests without addon table

This commit is contained in:
Philipp 2023-02-21 21:01:40 +01:00
parent dffd28cf20
commit 7e92adef6c
No known key found for this signature in database
GPG key ID: 24A7501396EB5432

View file

@ -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();