When creating a record in setUp()
:
public function setUp(){
parent::setUp();
$company = new App\Company();
$company->company_name = 'MyTest';
$company->save();
}
I get the following error:
Base table or view not found
I am using use DatabaseMigrations;
in my TestCase
. It could be that the migrations run just before a testCase starts, so when `setUpz is run there is no table created yet.
Using Laravel 5.1
Currently I have to repeat myself by creating this record in every test.
Any ideas how to make this work?