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; protected $user; public function setUp() { parent::setUp(); $user = factory(\Orka\Entities\User::class)->create(); $this->user = $user; } public function it_shows_no_connected_providers() { $this ->actingAs($this->user) ->visit('/teams/1/providers') ->see('You have not connected a provider yet.') ; } }
When I run this code, I get an error message indicating that the tables do not exist, the only way to make it work is to call $this->runDatabaseMigrations(); in the setUp() method, but as far as I know, I do not need to do this. I have similar problems with DatabaseTransactions.
Laravel 5.1.23
Any ideas on why this is happening as the docs say they should start automatically.
source share