test.php 1010 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. $params = require(__DIR__ . '/params.php');
  3. $dbParams = require(__DIR__ . '/db.php');
  4. // test database! Important not to run tests on production or development databases
  5. $dbParams['dsn'] = 'mysql:host=localhost;dbname=yii2_basic_tests';
  6. /**
  7. * Application configuration shared by all test types
  8. */
  9. return [
  10. 'id' => 'basic-tests',
  11. 'basePath' => dirname(__DIR__),
  12. 'language' => 'en-US',
  13. 'components' => [
  14. 'db' => $dbParams,
  15. 'mailer' => [
  16. 'useFileTransport' => true,
  17. ],
  18. 'urlManager' => [
  19. 'showScriptName' => true,
  20. ],
  21. 'request' => [
  22. // it's not recommended to run functional tests with CSRF validation enabled
  23. 'enableCsrfValidation' => false,
  24. // but if you absolutely need it set cookie domain to localhost
  25. /*
  26. 'csrfCookie' => [
  27. 'domain' => 'localhost',
  28. ],
  29. */
  30. ],
  31. ],
  32. 'params' => $params,
  33. ];