From bd8c7922dde05bd956efb90d148e55076f9c541e Mon Sep 17 00:00:00 2001 From: Anna-Sokolowska Date: Fri, 6 May 2022 13:22:59 +0200 Subject: [PATCH] #89 - unit tests init --- bootstrap/app.php | 24 ++++++++++++++++++++++++ bootstrap/cache/.gitignore | 2 ++ phpunit.xml | 3 +-- tests/CreatesApplication.php | 20 ++++++++++++++++++++ tests/TestCase.php | 12 ++++++++++++ 5 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 bootstrap/app.php create mode 100644 bootstrap/cache/.gitignore create mode 100644 tests/CreatesApplication.php create mode 100644 tests/TestCase.php diff --git a/bootstrap/app.php b/bootstrap/app.php new file mode 100644 index 00000000..b434403e --- /dev/null +++ b/bootstrap/app.php @@ -0,0 +1,24 @@ +singleton( + Illuminate\Contracts\Http\Kernel::class, + Blumilk\Meetup\Core\Http\Kernel::class +); + +$app->singleton( + Illuminate\Contracts\Console\Kernel::class, + Blumilk\Meetup\Core\Console\Kernel::class +); + +$app->singleton( + Illuminate\Contracts\Debug\ExceptionHandler::class, + Blumilk\Meetup\Core\Exceptions\Handler::class +); + +return $app; diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore new file mode 100644 index 00000000..d6b7ef32 --- /dev/null +++ b/bootstrap/cache/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/phpunit.xml b/phpunit.xml index 96c6ff7a..65a00d5c 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -16,8 +16,7 @@ - - + diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php new file mode 100644 index 00000000..efeacce9 --- /dev/null +++ b/tests/CreatesApplication.php @@ -0,0 +1,20 @@ +make(Kernel::class)->bootstrap(); + + return $app; + } +} diff --git a/tests/TestCase.php b/tests/TestCase.php new file mode 100644 index 00000000..53411164 --- /dev/null +++ b/tests/TestCase.php @@ -0,0 +1,12 @@ +