From ba5bde7c91efca9d6f6fbf034de45872767be7df Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 5 Dec 2016 12:58:44 -0600 Subject: [PATCH] add trait --- tests/CreatesApplication.php | 22 ++++++++++++++++++++++ tests/TestCase.php | 22 +--------------------- 2 files changed, 23 insertions(+), 21 deletions(-) create mode 100644 tests/CreatesApplication.php diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php new file mode 100644 index 00000000000..547152f6a93 --- /dev/null +++ b/tests/CreatesApplication.php @@ -0,0 +1,22 @@ +make(Kernel::class)->bootstrap(); + + return $app; + } +} diff --git a/tests/TestCase.php b/tests/TestCase.php index b4699fe9586..2932d4a69d6 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,29 +2,9 @@ namespace Tests; -use Illuminate\Contracts\Console\Kernel; use Illuminate\Foundation\Testing\TestCase as BaseTestCase; abstract class TestCase extends BaseTestCase { - /** - * The base URL to use while testing the application. - * - * @var string - */ - protected $baseUrl = 'http://localhost'; - - /** - * Creates the application. - * - * @return \Illuminate\Foundation\Application - */ - public function createApplication() - { - $app = require __DIR__.'/../bootstrap/app.php'; - - $app->make(Kernel::class)->bootstrap(); - - return $app; - } + use CreatesApplication; }