From b671dd3e1cfeae80d7c4670f73797015ccbec970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Fri, 2 Jun 2023 12:38:08 +0200 Subject: [PATCH] revert and fix phpunit --- phpunit.xml | 4 +--- tests/BaseEnumRoutableTest.php | 29 ------------------------ tests/BaseEnumTest.php | 1 - tests/TestCase.php | 40 ++++++++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+), 33 deletions(-) create mode 100644 tests/TestCase.php diff --git a/phpunit.xml b/phpunit.xml index 6a6e117..893d4af 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -32,8 +32,6 @@ - - - + diff --git a/tests/BaseEnumRoutableTest.php b/tests/BaseEnumRoutableTest.php index fb59409..05bec3a 100644 --- a/tests/BaseEnumRoutableTest.php +++ b/tests/BaseEnumRoutableTest.php @@ -15,37 +15,9 @@ use Kwaadpepper\Enum\Tests\Enums\NotRoutableEnum; use Kwaadpepper\Enum\Tests\Models\Alarm; use Kwaadpepper\Enum\Tests\Models\Journal; use Kwaadpepper\Enum\Tests\Models\Report; -use Orchestra\Testbench\TestCase; class BaseEnumRoutableTest extends TestCase { - /** - * Setup custom phpunit catch for deprecated error cathing. - * - * @return void - */ - public function setUp(): void - { - set_error_handler( - static function ($errno, $errstr) { - throw new \Exception($errstr, $errno); - }, - E_ALL - ); - parent::setUp(); - } - - /** - * Restore phpunit handler - * - * @return void - */ - public function tearDown(): void - { - restore_error_handler(); - parent::tearDown(); - } - /** * Defines aliases * @@ -78,7 +50,6 @@ class BaseEnumRoutableTest extends TestCase { // phpcs:enable return [ - \Illuminate\Log\LogServiceProvider::class, \Kwaadpepper\Enum\EnumServiceProvider::class, ]; } diff --git a/tests/BaseEnumTest.php b/tests/BaseEnumTest.php index 4ae1bf5..ca44df0 100644 --- a/tests/BaseEnumTest.php +++ b/tests/BaseEnumTest.php @@ -10,7 +10,6 @@ use Kwaadpepper\Enum\Tests\Enums\DuplicatedLabels; use Kwaadpepper\Enum\Tests\Enums\DuplicatedValues; use Kwaadpepper\Enum\Tests\Enums\ForceStringsFromInteger; use Kwaadpepper\Enum\Tests\Models\Report; -use Orchestra\Testbench\TestCase; class BaseEnumTest extends TestCase { diff --git a/tests/TestCase.php b/tests/TestCase.php new file mode 100644 index 0000000..98663da --- /dev/null +++ b/tests/TestCase.php @@ -0,0 +1,40 @@ +