From b1e92ab866e03ac9ac3eb085764d9c5c802396a9 Mon Sep 17 00:00:00 2001 From: Shift Date: Tue, 6 Aug 2024 20:25:21 +0000 Subject: [PATCH] Declare data providers as `static` --- tests/Feature/Checkouts/Api/AssetCheckoutTest.php | 2 +- tests/Feature/Checkouts/Ui/AssetCheckoutTest.php | 2 +- .../Webhooks/SlackNotificationsUponCheckinTest.php | 4 ++-- .../Webhooks/SlackNotificationsUponCheckoutTest.php | 4 ++-- tests/Unit/CompanyScopingTest.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/Feature/Checkouts/Api/AssetCheckoutTest.php b/tests/Feature/Checkouts/Api/AssetCheckoutTest.php index 44783aa63c..ded3889642 100644 --- a/tests/Feature/Checkouts/Api/AssetCheckoutTest.php +++ b/tests/Feature/Checkouts/Api/AssetCheckoutTest.php @@ -83,7 +83,7 @@ class AssetCheckoutTest extends TestCase * This data provider contains checkout targets along with the * asset's expected location after the checkout process. */ - public function checkoutTargets(): array + public static function checkoutTargets(): array { return [ 'Checkout to User' => [ diff --git a/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php b/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php index 99e30fdcbb..f268a9385e 100644 --- a/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php @@ -122,7 +122,7 @@ class AssetCheckoutTest extends TestCase * This data provider contains checkout targets along with the * asset's expected location after the checkout process. */ - public function checkoutTargets(): array + public static function checkoutTargets(): array { return [ 'User' => [function () { diff --git a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php index d6f3857a9c..adaede07ec 100644 --- a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php +++ b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php @@ -28,7 +28,7 @@ class SlackNotificationsUponCheckinTest extends TestCase Notification::fake(); } - public function assetCheckInTargets(): array + public static function assetCheckInTargets(): array { return [ 'Asset checked out to user' => [fn() => User::factory()->create()], @@ -37,7 +37,7 @@ class SlackNotificationsUponCheckinTest extends TestCase ]; } - public function licenseCheckInTargets(): array + public static function licenseCheckInTargets(): array { return [ 'License checked out to user' => [fn() => User::factory()->create()], diff --git a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php index 753c469778..4f34da2857 100644 --- a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php +++ b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php @@ -30,7 +30,7 @@ class SlackNotificationsUponCheckoutTest extends TestCase Notification::fake(); } - public function assetCheckoutTargets(): array + public static function assetCheckoutTargets(): array { return [ 'Asset checked out to user' => [fn() => User::factory()->create()], @@ -39,7 +39,7 @@ class SlackNotificationsUponCheckoutTest extends TestCase ]; } - public function licenseCheckoutTargets(): array + public static function licenseCheckoutTargets(): array { return [ 'License checked out to user' => [fn() => User::factory()->create()], diff --git a/tests/Unit/CompanyScopingTest.php b/tests/Unit/CompanyScopingTest.php index aefd5dd016..ff55e83056 100644 --- a/tests/Unit/CompanyScopingTest.php +++ b/tests/Unit/CompanyScopingTest.php @@ -17,7 +17,7 @@ use Tests\TestCase; class CompanyScopingTest extends TestCase { - public function models(): array + public static function models(): array { return [ 'Accessories' => [Accessory::class],