I'm failing to see a clear way to do this, although I can see it being reiterated multiple times in the documentation, specifically:
Use yii migrate tool to upgrade your test database to the latest version;
found in http://www.yiiframework.com/doc-2.0/guide-test-fixture.html#summary (just to give an example)
What happens is that no matter how I configure the _console.php
and _config.php
within my tests/unit
folder, if I run the migration tool is picking up the main app db:
$ cd tests/unit
$ ../../yii migrate/up
Yii Migration Tool (based on Yii v2.0.0-dev)
No new migration found. Your system is up-to-date.
And yes, the test database is correctly configured (running tests will throw an error saying there are no tables). I can obviously create the db structure myself, but this is all about getting this feature work as it should.
I'm currently using the Basic app installed via composer.