1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | if (file_exists(__DIR__.'/testConfig.local.php')) { |
||
6 | include_once __DIR__.'/testConfig.local.php'; |
||
7 | } |
||
8 | |||
9 | /* |
||
10 | * DB connection settings |
||
11 | */ |
||
12 | if ('mysql' == TEST_STEFANO_DB_VENDOR) { |
||
0 ignored issues
–
show
introduced
by
![]() |
|||
13 | defined('TEST_STEFANO_DB_HOSTNAME') |
||
14 | || define('TEST_STEFANO_DB_HOSTNAME', 'mariadb'); |
||
15 | defined('TEST_STEFANO_DB_DB_NAME') |
||
16 | || define('TEST_STEFANO_DB_DB_NAME', 'stefano_tests'); |
||
17 | defined('TEST_STEFANO_DB_USER') |
||
18 | || define('TEST_STEFANO_DB_USER', 'root'); |
||
19 | defined('TEST_STEFANO_DB_PASSWORD') |
||
20 | || define('TEST_STEFANO_DB_PASSWORD', ''); |
||
21 | } elseif ('pgsql' == TEST_STEFANO_DB_VENDOR) { |
||
22 | defined('TEST_STEFANO_DB_HOSTNAME') |
||
23 | || define('TEST_STEFANO_DB_HOSTNAME', 'postgres'); |
||
24 | defined('TEST_STEFANO_DB_DB_NAME') |
||
25 | || define('TEST_STEFANO_DB_DB_NAME', 'stefano_tests'); |
||
26 | defined('TEST_STEFANO_DB_USER') |
||
27 | || define('TEST_STEFANO_DB_USER', 'root'); |
||
28 | defined('TEST_STEFANO_DB_PASSWORD') |
||
29 | || define('TEST_STEFANO_DB_PASSWORD', ''); |
||
30 | } else { |
||
31 | throw new \Exception(sprintf('Unsupported adapter "%s"', TEST_STEFANO_DB_VENDOR)); |
||
32 | } |
||
33 |