I have an issue with running migrations while making a test. I have migrations in different places. User migrations depend on Company migrations but each time I run tests I have an error that table 'companies' doesn't exist.
Code from test class:
protected function setUp()
{
parent::setUp();
$this->artisan('migrate', [
'--path' => ['Modules/Company/Database/Migrations',
'Modules/User/Database/Migrations'],
]);
}
protected function tearDown()
{
$this->artisan('migrate:reset', [
'--path' => ['Modules/User/Database/Migrations',
'Modules/Company/Database/Migrations'],
]);
parent::tearDown();
}
Can anyone help me, please. Thanks!