I have setup Codeception and Laravel 5 to work. And they work.
But now, I want to run codeception with a testing database, not local.
So in functional.suite.yml I have:
functional.suite.yml
class_name: FunctionalTester modules: enabled: [Filesystem, FunctionalHelper, Laravel5] config: Laravel5: environment_file: .env.testing
And that works. It loads the values from .env.testing and runs test on testing database.
.env.testing
The problem now is that I want to migrate the testing database before running the tests.
I do php artisan migrate --env=testing but that migrates my local database specified in .env file.
php artisan migrate --env=testing
.env
Is there a way to migrate a database different from one specified in .env ?
Please sign in or create an account to participate in this conversation.
Reply to
Use Markdown with GitHub-flavored code blocks.
There's no shortage of content at Laracasts. In fact, you could watch nonstop for days upon days, and still not see everything!
Get Started
How to migrate a testing database in Laravel 5?
I have setup Codeception and Laravel 5 to work. And they work.
But now, I want to run codeception with a testing database, not local.
So in
functional.suite.yml
I have:And that works. It loads the values from
.env.testing
and runs test on testing database.The problem now is that I want to migrate the testing database before running the tests.
I do
php artisan migrate --env=testing
but that migrates my local database specified in.env
file.Is there a way to migrate a database different from one specified in
.env
?