You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
593 B
PHTML
26 lines
593 B
PHTML
7 years ago
|
<?php
|
||
|
|
||
|
namespace Engelsystem\Test\Feature\Database;
|
||
|
|
||
|
use PHPUnit\Framework\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'];
|
||
|
}
|
||
|
}
|