From 3161459ab08e624c6d9befd199d366e541d2d064 Mon Sep 17 00:00:00 2001 From: Kei Date: Fri, 17 May 2024 11:43:56 +0700 Subject: [PATCH] unit/controller --- tests/Unit/Controllers/UrlControllerTest.php | 5 +---- tests/Unit/Controllers/UrlRedirectControllerTest.php | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/Unit/Controllers/UrlControllerTest.php b/tests/Unit/Controllers/UrlControllerTest.php index f49bc42ff..86723890a 100644 --- a/tests/Unit/Controllers/UrlControllerTest.php +++ b/tests/Unit/Controllers/UrlControllerTest.php @@ -3,10 +3,10 @@ namespace Tests\Unit\Controllers; use App\Models\Url; -use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; +#[\PHPUnit\Framework\Attributes\Group('controller')] class UrlControllerTest extends TestCase { /** @@ -14,7 +14,6 @@ class UrlControllerTest extends TestCase * (Urls table) must be filled with a null value. */ #[Test] - #[Group('u-controller')] public function guestShortenURL(): void { $longUrl = 'https://laravel.com'; @@ -30,7 +29,6 @@ public function guestShortenURL(): void * the authenticated user id. */ #[Test] - #[Group('u-controller')] public function userShortenURL(): void { $user = $this->normalUser(); @@ -44,7 +42,6 @@ public function userShortenURL(): void } #[Test] - #[Group('u-controller')] public function showDetail(): void { $url = Url::factory()->create(); diff --git a/tests/Unit/Controllers/UrlRedirectControllerTest.php b/tests/Unit/Controllers/UrlRedirectControllerTest.php index 88de810e9..4ea5ad19b 100644 --- a/tests/Unit/Controllers/UrlRedirectControllerTest.php +++ b/tests/Unit/Controllers/UrlRedirectControllerTest.php @@ -4,14 +4,13 @@ use App\Models\Url; use App\Models\Visit; -use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; +#[\PHPUnit\Framework\Attributes\Group('controller')] class UrlRedirectControllerTest extends TestCase { #[Test] - #[Group('u-controller')] public function urlRedirection(): void { $url = Url::factory()->create();