From 08eefbcc11f62375ca956502bda3224308436298 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 29 Nov 2016 15:48:33 -0600 Subject: [PATCH] Organize tests. --- composer.json | 8 ++------ phpunit.xml | 8 ++++++-- tests/{ => Feature}/ExampleTest.php | 7 +++++-- tests/TestCase.php | 9 +++++++-- tests/Unit/ExampleTest.php | 21 +++++++++++++++++++++ 5 files changed, 41 insertions(+), 12 deletions(-) rename tests/{ => Feature}/ExampleTest.php (74%) create mode 100644 tests/Unit/ExampleTest.php diff --git a/composer.json b/composer.json index 56e1e62b..855a2c66 100644 --- a/composer.json +++ b/composer.json @@ -20,14 +20,10 @@ "database" ], "psr-4": { - "App\\": "app/" + "App\\": "app/", + "Tests\\": "tests/" } }, - "autoload-dev": { - "classmap": [ - "tests/TestCase.php" - ] - }, "scripts": { "post-root-package-install": [ "php -r \"file_exists('.env') || copy('.env.example', '.env');\"" diff --git a/phpunit.xml b/phpunit.xml index 712e0af5..a2c496ef 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -9,8 +9,12 @@ processIsolation="false" stopOnFailure="false"> - - ./tests + + ./tests/Feature + + + + ./tests/Unit diff --git a/tests/ExampleTest.php b/tests/Feature/ExampleTest.php similarity index 74% rename from tests/ExampleTest.php rename to tests/Feature/ExampleTest.php index 2f2d20ff..bcbb562c 100644 --- a/tests/ExampleTest.php +++ b/tests/Feature/ExampleTest.php @@ -1,5 +1,8 @@ visit('/') ->see('Laravel'); diff --git a/tests/TestCase.php b/tests/TestCase.php index 8208edca..b4699fe9 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,6 +1,11 @@ make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); + $app->make(Kernel::class)->bootstrap(); return $app; } diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php new file mode 100644 index 00000000..7f166704 --- /dev/null +++ b/tests/Unit/ExampleTest.php @@ -0,0 +1,21 @@ +assertTrue(true); + } +}