Reputation: 1099
I understand that Laravel 5 is unfinished, but so far I got around that pretty well.
My question concerns testing. Previously you were able to Artisan::call('migrate')
in your test to set up the database.
How should we do this in Laravel 5?
I tried Artisan::call('migrate')
, $this->app['artisan']->call('migrate')
, including the class via use Illuminate\Support\Facades\Artisan
, nothing of which worked.
Upvotes: 1
Views: 560
Reputation: 1099
I found a temporary solution while we wait for better built-in support.
$this->app->make('Illuminate\Contracts\Console\Kernel')->handle(
new Symfony\Component\Console\Input\StringInput('migrate'),
new Symfony\Component\Console\Output\NullOutput);
Upvotes: 2