I have the following test class
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class ProvidersTest extends TestCase
{
use DatabaseMigrations;
/**
* @var \Orka\Entities\User
*/
protected $user;
public function setUp()
{
parent::setUp();
$user = factory(\Orka\Entities\User::class)->create();
$this->user = $user;
}
/**
* @test
*/
public function it_shows_no_connected_providers()
{
$this
->actingAs($this->user)
->visit('/teams/1/providers')
->see('You have not connected a provider yet.')
;
}
}
When running this code I get an error telling me tables do no exist, the only way I can get it to work is to call $this->runDatabaseMigrations();
in the setUp()
method, but as far as I know I should not need to do that. I have similar issues with DatabaseTransactions.
Laravel 5.1.23
Any ideas on why this is happening as the docs say that it should be triggered automatically.