summaryrefslogtreecommitdiff
path: root/tests/Feature/Database/DatabaseTest.php
blob: 0116e526022c55aa8b878b58da1368a3a837115b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php

namespace Engelsystem\Test\Feature\Database;

use Engelsystem\Test\Unit\TestCase;

abstract class DatabaseTest extends TestCase
{
    /**
     * Returns the database config
     *
     * @return string[]
     */
    protected function getDbConfig()
    {
        $configValues = require __DIR__ . '/../../../config/config.default.php';
        $configFile = __DIR__ . '/../../../config/config.php';

        if (file_exists($configFile)) {
            $configValues = array_replace_recursive($configValues, require $configFile);
        }

        return $configValues['database'];
    }
}