test.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. $params = require __DIR__ . '/params.php';
  3. $db = require __DIR__ . '/test_db.php';
  4. /**
  5. * Application configuration shared by all test types
  6. */
  7. return [
  8. 'id' => 'basic-tests',
  9. 'basePath' => dirname(__DIR__),
  10. 'aliases' => [
  11. '@bower' => '@vendor/bower-asset',
  12. '@npm' => '@vendor/npm-asset',
  13. ],
  14. 'language' => 'en-US',
  15. 'components' => [
  16. 'db' => $db,
  17. 'mailer' => [
  18. 'useFileTransport' => true,
  19. ],
  20. 'assetManager' => [
  21. 'basePath' => __DIR__ . '/../web/assets',
  22. ],
  23. 'urlManager' => [
  24. 'showScriptName' => true,
  25. ],
  26. 'user' => [
  27. 'identityClass' => 'app\models\User',
  28. ],
  29. 'request' => [
  30. 'cookieValidationKey' => 'test',
  31. 'enableCsrfValidation' => false,
  32. // but if you absolutely need it set cookie domain to localhost
  33. /*
  34. 'csrfCookie' => [
  35. 'domain' => 'localhost',
  36. ],
  37. */
  38. ],
  39. ],
  40. 'params' => $params,
  41. ];