From 782574d69186bc1efc7298904528097a301bcbd1 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Wed, 29 Nov 2023 10:49:50 +0000 Subject: [PATCH] chore: removes PHP 8.2 only test --- .../Controllers/ProductController.php | 2 +- tests/ToBeReadonly.php | 36 ------------------- 2 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 tests/ToBeReadonly.php diff --git a/tests/Fixtures/Controllers/ProductController.php b/tests/Fixtures/Controllers/ProductController.php index f4734bd..d4344d0 100644 --- a/tests/Fixtures/Controllers/ProductController.php +++ b/tests/Fixtures/Controllers/ProductController.php @@ -6,7 +6,7 @@ use Tests\Fixtures\Models\Product; -final readonly class ProductController +final class ProductController { public function index(): array { diff --git a/tests/ToBeReadonly.php b/tests/ToBeReadonly.php deleted file mode 100644 index cca9f9d..0000000 --- a/tests/ToBeReadonly.php +++ /dev/null @@ -1,36 +0,0 @@ -toBeReadonly() - ->and(UserController::class) - ->not->toBeReadonly(); -}); - -it('fails 1', function () { - expect([UserController::class])->toBeReadonly(); -})->throws( - ArchExpectationFailedException::class, - "Expecting 'tests/Fixtures/Controllers/UserController.php' to be readonly." -); - -test('ignoring', function () { - expect('Tests\Fixtures\Controllers') - ->toBeReadonly() - ->ignoring(UserController::class) - ->not->toBeReadonly() - ->ignoring(ProductController::class); -}); - -test('ignoring opposite message', function () { - expect(ProductController::class) - ->not - ->toBeReadonly(); -})->throws( - ArchExpectationFailedException::class, - "Expecting 'tests/Fixtures/Controllers/ProductController.php' not to be readonly." -);