summaryrefslogtreecommitdiff
path: root/tests/Feature/Database/DatabaseTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Feature/Database/DatabaseTest.php')
-rw-r--r--tests/Feature/Database/DatabaseTest.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/Feature/Database/DatabaseTest.php b/tests/Feature/Database/DatabaseTest.php
new file mode 100644
index 00000000..11df6779
--- /dev/null
+++ b/tests/Feature/Database/DatabaseTest.php
@@ -0,0 +1,25 @@
+<?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'];
+ }
+}