I am trying to run my unit test and create a database during setup. For some reason I am getting the error Unknown database \'coretest\'. If I create the databa
Unknown database \'coretest\'
In Laravel 5 it's possible to call migrations internally to the Laravel process which ends up running a good bit quicker than using external commands.
In TestCase::setUp (or earlier), call the migration command with:
$kernel = app('Illuminate\Contracts\Console\Kernel'); $kernel->call('migrate');