From 3e7cc362fab1907941c3f9e9ae7892d4578b28b1 Mon Sep 17 00:00:00 2001 From: Toon Van den Bos Date: Fri, 26 Jul 2024 12:45:57 +0200 Subject: [PATCH] Updated tests configuration --- composer.json | 30 ++++++++++++---------- phpunit.xml | 4 +-- tests/Pest.php | 2 +- tests/TestCase.php | 10 ++++++++ tests/{ => Unit}/CastTest.php | 0 tests/{ => Unit}/TimezoneSingletonTest.php | 0 6 files changed, 28 insertions(+), 18 deletions(-) create mode 100644 tests/TestCase.php rename tests/{ => Unit}/CastTest.php (100%) rename tests/{ => Unit}/TimezoneSingletonTest.php (100%) diff --git a/composer.json b/composer.json index 24bf7b5..b19f3dc 100644 --- a/composer.json +++ b/composer.json @@ -9,11 +9,19 @@ "time", "conversion" ], + "type": "library", + "license": "MIT", + "autoload": { + "psr-4": { + "Whitecube\\LaravelTimezones\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Whitecube\\LaravelTimezones\\Tests\\": "tests/" + } + }, "authors": [ - { - "name": "Whitecube", - "email": "hello@whitecube.be" - }, { "name": "Toon Van den Bos", "email": "toon@whitecube.be" @@ -21,14 +29,12 @@ ], "require": { "php": ">=8.1", - "laravel/framework": "^9|^10|^11.0", + "laravel/framework": "^9|^10|^11", "nesbot/carbon": "^2.64|^3.0" }, - "autoload": { - "psr-4": { - "Whitecube\\LaravelTimezones\\": "src/", - "Whitecube\\LaravelTimezones\\Tests\\": "tests/" - } + "require-dev": { + "mockery/mockery": "^1.6", + "pestphp/pest": "^2.34" }, "extra": { "laravel": { @@ -37,10 +43,6 @@ ] } }, - "require-dev": { - "pestphp/pest": "^1.22|^2.34", - "mockery/mockery": "^1.6" - }, "config": { "allow-plugins": { "pestphp/pest-plugin": true diff --git a/phpunit.xml b/phpunit.xml index 3a30bb0..0c12bb9 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,9 +1,8 @@ @@ -12,7 +11,6 @@ - ./app ./src diff --git a/tests/Pest.php b/tests/Pest.php index 9c0893c..abb5e11 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -17,7 +17,7 @@ | */ -// uses(Tests\TestCase::class)->in('Feature'); +uses(\Whitecube\LaravelTimezones\Tests\TestCase::class)->in('Unit'); /* |-------------------------------------------------------------------------- diff --git a/tests/TestCase.php b/tests/TestCase.php new file mode 100644 index 0000000..e6bef65 --- /dev/null +++ b/tests/TestCase.php @@ -0,0 +1,10 @@ +