From 8aa5e1caa960d624d5505a20dcc7c2c87b28dca7 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Fri, 25 Apr 2025 16:34:30 +0100 Subject: [PATCH] Cleanup roles after running `SitesTest@gets_authorized_sites` --- tests/Sites/SitesTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/Sites/SitesTest.php b/tests/Sites/SitesTest.php index 39897b1239..84a9358479 100644 --- a/tests/Sites/SitesTest.php +++ b/tests/Sites/SitesTest.php @@ -3,6 +3,7 @@ namespace Tests\Sites; use Illuminate\Support\Collection; +use Illuminate\Support\Facades\File; use PHPUnit\Framework\Attributes\Test; use Statamic\Facades\Role; use Statamic\Facades\User; @@ -35,6 +36,13 @@ public function setUp(): void ]); } + public function tearDown(): void + { + File::delete(resource_path('users/roles.yaml')); + + parent::tearDown(); + } + #[Test] public function gets_all_sites() {