From af87c2d40011db7ecdfae3ea013b877448a5ca8a Mon Sep 17 00:00:00 2001 From: denisdulici Date: Sat, 14 Mar 2020 23:38:54 +0300 Subject: [PATCH] updated test suite --- phpunit.xml | 33 +++++++++++++++------------------ tests/CreatesApplication.php | 2 +- tests/TestCase.php | 4 ++-- tests/Unit/ExampleTest.php | 4 +--- 4 files changed, 19 insertions(+), 24 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index 8dcecdf3c..a32e1fc5d 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,23 +1,17 @@ - + colors="true"> - - ./tests/Feature - ./modules/**/Tests/Feature - - ./tests/Unit ./modules/**/Tests/Unit + + ./tests/Feature + ./modules/**/Tests/Feature + @@ -25,10 +19,13 @@ - - - - - + + + + + + + + diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php index 547152f6a..ab9240255 100644 --- a/tests/CreatesApplication.php +++ b/tests/CreatesApplication.php @@ -13,7 +13,7 @@ trait CreatesApplication */ public function createApplication() { - $app = require __DIR__.'/../bootstrap/app.php'; + $app = require __DIR__ . '/../bootstrap/app.php'; $app->make(Kernel::class)->bootstrap(); diff --git a/tests/TestCase.php b/tests/TestCase.php index 8ef0a3305..e157590a0 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -3,10 +3,10 @@ namespace Tests; use App\Traits\Jobs; -use Artisan; use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Foundation\Testing\TestCase as BaseTestCase; +use Illuminate\Support\Facades\Artisan; abstract class TestCase extends BaseTestCase { @@ -19,4 +19,4 @@ abstract class TestCase extends BaseTestCase Artisan::call('db:seed', ['--class' => '\Database\Seeds\TestCompany', '--force' => true]); Artisan::call('company:seed', ['company' => 1]); } -} \ No newline at end of file +} diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php index 8b7026f38..c01ae64d3 100644 --- a/tests/Unit/ExampleTest.php +++ b/tests/Unit/ExampleTest.php @@ -2,9 +2,7 @@ namespace Tests\Unit; -use Tests\TestCase; -use Illuminate\Foundation\Testing\DatabaseMigrations; -use Illuminate\Foundation\Testing\DatabaseTransactions; +use PHPUnit\Framework\TestCase; class ExampleTest extends TestCase {