From 15c104436f47ac17dccf790b35d8ad82c28bad1c Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Sat, 13 Apr 2024 13:46:20 +0200 Subject: [PATCH] feat: allow PHPUnit 11 --- composer.json | 2 +- tests/Formatter/CronTest.php | 2 ++ tests/Updater/CronUpdaterTest.php | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 80553ef..67cb6a4 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ }, "require-dev": { "symfony/filesystem": "^4.4|^5.4|^6.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.6|^10.5|^11.1" }, "autoload": { "psr-4": { "MyBuilder\\Cronos\\": "src" } diff --git a/tests/Formatter/CronTest.php b/tests/Formatter/CronTest.php index 2997a66..1fff5cb 100644 --- a/tests/Formatter/CronTest.php +++ b/tests/Formatter/CronTest.php @@ -3,6 +3,7 @@ namespace MyBuilder\Cronos\Tests\Formatter; use MyBuilder\Cronos\Formatter\Cron; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; class CronTest extends TestCase @@ -17,6 +18,7 @@ protected function setUp(): void /** * @test */ + #[Test] public function shouldBuildConfiguration(): void { $this->cron diff --git a/tests/Updater/CronUpdaterTest.php b/tests/Updater/CronUpdaterTest.php index 2ec3017..cf62609 100644 --- a/tests/Updater/CronUpdaterTest.php +++ b/tests/Updater/CronUpdaterTest.php @@ -5,6 +5,7 @@ use MyBuilder\Cronos\Formatter\Cron; use MyBuilder\Cronos\Updater\CronManipulator; use MyBuilder\Cronos\Updater\CronUpdater; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; class CronUpdaterTest extends TestCase @@ -22,6 +23,7 @@ protected function setUp(): void /** * @test */ + #[Test] public function shouldReplaceContent(): void { $this->updater->replaceWith(new Cron()); @@ -32,6 +34,7 @@ public function shouldReplaceContent(): void /** * @test */ + #[Test] public function shouldAppendKeyIfNotExist(): void { $this->manipulatorStub->contents = <<manipulatorStub->contents = <<