Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specific .env.test for testing #4

Closed
drsdre opened this issue Dec 10, 2020 · 1 comment
Closed

Specific .env.test for testing #4

drsdre opened this issue Dec 10, 2020 · 1 comment

Comments

@drsdre
Copy link

drsdre commented Dec 10, 2020

One of the nice features of the Laravel framework is to use a separate .env file for testing (.env.test). Could this also be achieved used yii2-dotenv?

I've tried setting this up using the line define('DOTENV_FILE', '.env.test'); in common/config/codeception-local.php and yii-test. Somehow loading of fixtures on the second test seem to keep failing now (empty). It's not 100% clear yet if these are related, I have to add.

Thanks,
Andre

@drsdre
Copy link
Author

drsdre commented Dec 10, 2020

My wrong, should have used defined('DOTENV_FILE') or define('DOTENV_FILE', '.env.test'); as Codeception reinit's the configs on each test.

@drsdre drsdre closed this as completed Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant