mirror of
https://github.com/friendica/friendica
synced 2024-11-09 22:22:53 +00:00
Fix API tests without addon table
This commit is contained in:
parent
dffd28cf20
commit
7e92adef6c
1 changed files with 4 additions and 4 deletions
|
@ -24,6 +24,7 @@ namespace Friendica\Test\src\Module\Api;
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Capabilities\ICanCreateResponses;
|
use Friendica\Capabilities\ICanCreateResponses;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Addon;
|
||||||
|
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Database\Database;
|
use Friendica\Database\Database;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
|
@ -212,15 +213,14 @@ abstract class ApiTest extends FixtureTest
|
||||||
$func(DI::app());
|
$func(DI::app());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var Database $dba */
|
/** @var $config IManageConfigValues */
|
||||||
$dba = $this->dice->create(Database::class);
|
$config = $this->dice->create(IManageConfigValues::class);
|
||||||
|
|
||||||
$dba->insert('addon', [
|
$config->set('addons', $addon, [
|
||||||
'name' => $addon,
|
'name' => $addon,
|
||||||
'installed' => true,
|
'installed' => true,
|
||||||
'timestamp' => $t,
|
'timestamp' => $t,
|
||||||
'plugin_admin' => function_exists($addon . '_addon_admin'),
|
'plugin_admin' => function_exists($addon . '_addon_admin'),
|
||||||
'hidden' => file_exists('addon/' . $addon . '/.hidden')
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Addon::loadAddons();
|
Addon::loadAddons();
|
||||||
|
|
Loading…
Reference in a new issue