reset_db(); Mail::fake(); #Artisan::call('migrate'); #Artisan::call('db:seed'); } /** * Creates the application. * * @return \Illuminate\Foundation\Application */ public function createApplication() { $app = require __DIR__.'/../bootstrap/app.php'; $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); //$app['config']->set('database.default','testing'); return $app; } public function createRepository($repo_name) { $app = $this->createApplication(); return $app->make('App\Repositories\\' . $repo_name); } public function addData($file) { $svc = app('\App\Services\DatabaseService'); $file_path = base_path('tests/data/' . $file . '.yml'); $svc->seed_from_yaml_file($file_path); } }