engelsystem/tests/Feature/Database/DatabaseTest.php

26 lines
597 B
PHP
Raw Normal View History

2017-10-31 19:26:48 +01:00
<?php
namespace Engelsystem\Test\Feature\Database;
use Engelsystem\Test\Unit\TestCase;
2017-10-31 19:26:48 +01:00
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'];
}
}