remove unreachable code
This commit is contained in:
parent
9608555345
commit
3c8f820780
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user