config.php 942 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * This is the configuration file for the Yii2 unit tests.
  4. * You can override configuration values by creating a `config.local.php` file
  5. * and manipulate the `$config` variable.
  6. * For example to change PostgreSQL username and password your `config.local.php` should
  7. * contain the following:
  8. *
  9. * <?php
  10. * $config['databases']['pgsql']['username'] = 'yiitest';
  11. * $config['databases']['pgsql']['password'] = 'changeme';
  12. */
  13. $config = [
  14. 'databases' => [
  15. 'sqlite' => [
  16. 'dsn' => 'sqlite::memory:',
  17. 'fixture' => __DIR__ . '/sqlite.sql',
  18. ],
  19. 'pgsql' => [
  20. 'dsn' => 'pgsql:host=localhost;port=5432;dbname=yiitest',
  21. 'username' => 'postgres',
  22. 'password' => 'postgres',
  23. 'fixture' => __DIR__ . '/pgsql.sql',
  24. ],
  25. ],
  26. ];
  27. if (is_file(__DIR__ . '/config.local.php')) {
  28. include(__DIR__ . '/config.local.php');
  29. }
  30. return $config;