make(Kernel::class)->bootstrap(); $this->coverPath = $app->basePath().'/public/img/covers'; return $app; } private function prepareForTests() { Artisan::call('migrate'); if (!User::all()->count()) { Artisan::call('db:seed'); } if (!file_exists($this->coverPath)) { mkdir($this->coverPath, 0777, true); } } }