From 520a9c3b97b1ecffae56189b680c968e7d11656c Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Sun, 11 Mar 2018 12:01:14 +0800 Subject: [PATCH] test: fix coverage --- app/Http/Controllers/SetupController.php | 3 +++ tests/SetupControllerTest.php | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/app/Http/Controllers/SetupController.php b/app/Http/Controllers/SetupController.php index 05dc86e9..55bbe3b8 100644 --- a/app/Http/Controllers/SetupController.php +++ b/app/Http/Controllers/SetupController.php @@ -45,6 +45,9 @@ class SetupController extends Controller throw new PrettyPageException(trans('setup.database.table-already-exists', ['tables' => json_encode($existingTables)]), 1); } + /** + * @codeCoverageIgnore + */ if (! function_exists('escapeshellarg')) { throw new PrettyPageException(trans('setup.disabled-functions.escapeshellarg'), 1); } diff --git a/tests/SetupControllerTest.php b/tests/SetupControllerTest.php index b7705ad3..4cb0132a 100644 --- a/tests/SetupControllerTest.php +++ b/tests/SetupControllerTest.php @@ -53,6 +53,10 @@ class SetupControllerTest extends TestCase { $this->visit('/setup/info') ->seePageIs('/setup/info'); + + Artisan::call('migrate:refresh'); + Schema::drop('users'); + $this->visit('/setup/info')->see('already exist'); } public function testFinish()