Call the initial value check in the test
This commit is contained in:
parent
e333f45d0f
commit
d70b77288d
|
@ -983,7 +983,10 @@ class DBStructure
|
|||
return DBA::toArray($stmtColumns);
|
||||
}
|
||||
|
||||
private static function checkInitialValues()
|
||||
/**
|
||||
* Check if initial database values do exist - or create them
|
||||
*/
|
||||
public static function checkInitialValues()
|
||||
{
|
||||
if (DBA::tableExists('contact') && !DBA::exists('contact', ['id' => 0])) {
|
||||
DBA::insert('contact', ['nurl' => '']);
|
||||
|
|
|
@ -57,10 +57,6 @@ return [
|
|||
],
|
||||
],
|
||||
'contact' => [
|
||||
[
|
||||
'id' => 0,
|
||||
'uid' => 0,
|
||||
],
|
||||
[
|
||||
'id' => 42,
|
||||
'uid' => 42,
|
||||
|
@ -136,11 +132,6 @@ return [
|
|||
'guid' => '6',
|
||||
],
|
||||
],
|
||||
'permissionset' => [
|
||||
[
|
||||
'id' => 0,
|
||||
]
|
||||
],
|
||||
'item' => [
|
||||
[
|
||||
'id' => 1,
|
||||
|
|
|
@ -12,9 +12,8 @@ use Friendica\Core\PConfig\IPConfig;
|
|||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Core\Session\ISession;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Database\DBStructure;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Network\HTTPException;
|
||||
|
@ -73,6 +72,8 @@ class ApiTest extends DatabaseTest
|
|||
|
||||
$dba->setTestmode(true);
|
||||
|
||||
DBStructure::checkInitialValues();
|
||||
|
||||
/** @var IConfig $config */
|
||||
$this->config = $this->dice->create(IConfig::class);
|
||||
|
||||
|
|
Loading…
Reference in a new issue