make('Illuminate\Contracts\Console\Kernel'); $app->loadEnvironmentFrom('.env.testing'); $instance->bootstrap(); return $app; } public function setUp() { parent::setUp(); $this->redis = Redis::connection(); $this->redis->flushall(); $this->prepareForTests(); } protected function prepareForTests() { Artisan::call('migrate'); Mail::pretend(true); $this->seed('TestSeeder'); } public function tearDown() { parent::tearDown(); } }