Running unit test on plugin does not run migrate

I’m trying to run the unit test only on a specific plugin but I’m not having success with the database migrate. I already configured it in phpunit.xml but it seems that it doesn’t recognize the defined env.

I ran php vendor/bin/phpunit plugins/metastore/ecommerce and it seems that it is only identifying the env defined in the phpunit.xml of the root.

And the result was this:

I accessed the plugin folder and ran php ../../../vendor/bin/phpunit and it identifies the plugin’s phpuni.xml env, however both attempts do not run migrate:

In this second form, from what I saw in xdebug, it doesn’t get past the parent::setUp() and run $this->migrateDatabase();

Does it make any different running it from the plugin directory?


The difference is that when it runs inside the plugin’s folder, it recognizes the phpunit.xml env, when it runs outside specifying only the plugin’s path, it doesn’t. But both did not run the migrate plugins.

Hi @kallef

We have added a database test that confirms it is working. Please try it on your system: