diff --git a/app/Http/Controllers/SetupController.php b/app/Http/Controllers/SetupController.php index b38b9535..a3fd3874 100644 --- a/app/Http/Controllers/SetupController.php +++ b/app/Http/Controllers/SetupController.php @@ -16,15 +16,6 @@ use Vectorface\Whip\Whip; class SetupController extends Controller { - public function welcome(Filesystem $filesystem) - { - if (!$filesystem->exists(base_path('.env'))) { - $filesystem->copy(base_path('.env.example'), base_path('.env')); - } - - return view('setup.wizard.welcome'); - } - public function database( Request $request, Filesystem $filesystem, diff --git a/routes/web.php b/routes/web.php index b0ea787d..71b93126 100644 --- a/routes/web.php +++ b/routes/web.php @@ -174,7 +174,7 @@ Route::group(['middleware' => ['authorize', 'admin'], 'prefix' => 'admin'], func */ Route::group(['prefix' => 'setup'], function () { Route::group(['middleware' => 'setup'], function () { - Route::any('/', 'SetupController@welcome'); + Route::view('/', 'setup.wizard.welcome'); Route::any('/database', 'SetupController@database'); Route::view('/info', 'setup.wizard.info'); Route::post('/finish', 'SetupController@finish'); diff --git a/tests/HttpTest/ControllersTest/SetupControllerTest.php b/tests/HttpTest/ControllersTest/SetupControllerTest.php index 49ea3868..5ab1a885 100644 --- a/tests/HttpTest/ControllersTest/SetupControllerTest.php +++ b/tests/HttpTest/ControllersTest/SetupControllerTest.php @@ -17,24 +17,6 @@ class SetupControllerTest extends TestCase $this->spy(\App\Services\Webpack::class); } - public function testWelcome() - { - $this->mock(Filesystem::class, function ($mock) { - $mock->shouldReceive('exists') - ->with(storage_path('install.lock')) - ->andReturn(false); - $mock->shouldReceive('exists') - ->with(base_path('.env')) - ->once() - ->andReturn(false); - $mock->shouldReceive('copy') - ->with(base_path('.env.example'), base_path('.env')) - ->once() - ->andReturn(true); - }); - $this->get('/setup')->assertViewIs('setup.wizard.welcome'); - } - public function testDatabase() { $this->mock(Filesystem::class, function ($mock) {