1

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.

4

1 に答える 1

2

組み込みサポートの改善を待つ間、一時的な解決策を見つけました。

$this->app->make('Illuminate\Contracts\Console\Kernel')->handle(
    new Symfony\Component\Console\Input\StringInput('migrate'),
    new Symfony\Component\Console\Output\NullOutput);
于 2014-10-23T16:52:33.827 に答える