From 160c24430fa03a697982c07cb1a102e772b99ab2 Mon Sep 17 00:00:00 2001 From: ryanaidilp Date: Sun, 1 Aug 2021 22:07:39 +0800 Subject: [PATCH] chore : update to lumen version 8 --- app/Console/Kernel.php | 4 ++-- phpunit.xml | 9 ++------- tests/ExampleTest.php | 21 +++++++++++++++++++++ tests/TestCase.php | 4 +--- 4 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 tests/ExampleTest.php diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 861ba63..ad6e311 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -13,7 +13,7 @@ class Kernel extends ConsoleKernel * @var array */ protected $commands = [ - \Illuminate\Cache\Console\ClearCommand::class + // ]; /** @@ -24,6 +24,6 @@ class Kernel extends ConsoleKernel */ protected function schedule(Schedule $schedule) { - $schedule->command('cache:clear')->weekly(); + // } } diff --git a/phpunit.xml b/phpunit.xml index f56b51d..9f3c51c 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -2,22 +2,17 @@ + colors="true" +> ./tests - - - ./app - - - diff --git a/tests/ExampleTest.php b/tests/ExampleTest.php new file mode 100644 index 0000000..1bad6ef --- /dev/null +++ b/tests/ExampleTest.php @@ -0,0 +1,21 @@ +get('/'); + + $this->assertEquals( + $this->app->version(), $this->response->getContent() + ); + } +} diff --git a/tests/TestCase.php b/tests/TestCase.php index cc415a8..136846b 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,8 +2,6 @@ use Laravel\Lumen\Testing\TestCase as BaseTestCase; -require './vendor/autoload.php'; - abstract class TestCase extends BaseTestCase { /** @@ -13,6 +11,6 @@ abstract class TestCase extends BaseTestCase */ public function createApplication() { - return require __DIR__ . '/../bootstrap/app.php'; + return require __DIR__.'/../bootstrap/app.php'; } }