1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 13:40:20 +02:00

DatabaseConfig: Implement Arrayable contract

This commit is contained in:
Franz Liedke
2019-02-01 13:00:07 +01:00
parent af185fd3d1
commit 968152b740
5 changed files with 9 additions and 7 deletions

View File

@@ -52,7 +52,7 @@ class DefaultInstallationTest extends TestCase
{
$factory = new ConnectionFactory(app());
return $factory->make($this->getDatabaseConfiguration()->getConfig());
return $factory->make($this->getDatabaseConfiguration()->toArray());
}
private function getAdmin(): AdminUser

View File

@@ -107,7 +107,7 @@ trait CreatesForum
{
return [
'debug' => true,
'database' => $this->getDatabaseConfiguration()->getConfig(),
'database' => $this->getDatabaseConfiguration()->toArray(),
'url' => 'http://flarum.local',
'paths' => [
'api' => 'api',
@@ -122,7 +122,7 @@ trait CreatesForum
return;
}
$dbConfig = $this->getDatabaseConfiguration()->getConfig();
$dbConfig = $this->getDatabaseConfiguration()->toArray();
$pdo = (new MySqlConnector)->connect($dbConfig);
$db = new MySqlConnection($pdo, $dbConfig['database'], $dbConfig['prefix'], $dbConfig);