From 984840dc82d8e74a6a763f9b8932f5e4b7304f54 Mon Sep 17 00:00:00 2001 From: Shift Date: Tue, 6 Aug 2024 20:25:18 +0000 Subject: [PATCH 01/12] Bump PHPUnit dependencies --- composer.json | 260 +++++++++++++++++++++++++------------------------- 1 file changed, 130 insertions(+), 130 deletions(-) diff --git a/composer.json b/composer.json index 9a76301e24..6d44077bb6 100644 --- a/composer.json +++ b/composer.json @@ -1,135 +1,135 @@ { - "name": "snipe/snipe-it", - "description": "Open source asset management system built on Laravel.", - "keywords": [ - "assets", - "asset-management", - "it-tools", - "inventory", - "laravel" - ], - "license": "AGPL-3.0-or-later", - "type": "project", - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/grokability/laravel-scim-server" - } - ], - "require": { - "php": "^8.1", - "ext-curl": "*", - "ext-fileinfo": "*", - "ext-json": "*", - "ext-mbstring": "*", - "ext-pdo": "*", - "alek13/slack": "^2.0", - "arietimmerman/laravel-scim-server": "dev-master", - "bacon/bacon-qr-code": "^2.0", - "barryvdh/laravel-debugbar": "^3.13", - "barryvdh/laravel-dompdf": "^2.0", - "doctrine/cache": "^1.10", - "doctrine/dbal": "^3.1", - "doctrine/instantiator": "^1.3", - "eduardokum/laravel-mail-auto-embed": "^2.0", - "enshrined/svg-sanitize": "^0.15.0", - "erusev/parsedown": "^1.7", - "guzzlehttp/guzzle": "^7.0.1", - "intervention/image": "^2.5", - "javiereguiluz/easyslugger": "^1.0", - "laravel-notification-channels/google-chat": "^3.0", - "laravel-notification-channels/microsoft-teams": "^1.1", - "laravel/framework": "^10.0", - "laravel/helpers": "^1.4", - "laravel/passport": "^11.0", - "laravel/slack-notification-channel": "^2.3", - "laravel/socialite": "^5.6", - "laravel/tinker": "^2.6", - "laravel/ui": "^4.0", - "laravelcollective/html": "^6.2", - "league/csv": "^9.7", - "league/flysystem-aws-s3-v3": "^3.0", - "livewire/livewire": "^3.5", - "neitanod/forceutf8": "^2.0", - "nesbot/carbon": "^2.32", - "nunomaduro/collision": "^6.1", - "okvpn/clock-lts": "^1.0", - "onelogin/php-saml": "^3.4", - "paragonie/constant_time_encoding": "^2.3", - "paragonie/sodium_compat": "^1.19", - "phpdocumentor/reflection-docblock": "^5.1", - "phpspec/prophecy": "^1.10", - "pragmarx/google2fa-laravel": "^1.3", - "rollbar/rollbar-laravel": "^8.0", - "spatie/laravel-backup": "^8.8", - "spatie/laravel-ignition": "^2.0", - "tecnickcom/tc-lib-barcode": "^1.15", - "tecnickcom/tcpdf": "^6.5", - "unicodeveloper/laravel-password": "^1.0", - "watson/validating": "^8.1" - }, - "suggest": { - "ext-ldap": "*", - "ext-zip": "*", - "ext-exif": "*" - }, - "require-dev": { - "brianium/paratest": "^v6.4.4", - "fakerphp/faker": "^1.16", - "larastan/larastan": "^2.9", - "mockery/mockery": "^1.4", - "nunomaduro/phpinsights": "^2.7", - "php-mock/php-mock-phpunit": "^2.10", - "phpunit/phpunit": "^9.6.19", - "squizlabs/php_codesniffer": "^3.5", - "symfony/css-selector": "^4.4", - "symfony/dom-crawler": "^4.4", - "vimeo/psalm": "^5.13" - }, - "extra": { - "laravel": { - "dont-discover": [ - "rollbar/rollbar-laravel" - ] - } - }, - "autoload": { - "classmap": [ - "database" + "name": "snipe/snipe-it", + "description": "Open source asset management system built on Laravel.", + "keywords": [ + "assets", + "asset-management", + "it-tools", + "inventory", + "laravel" ], - "psr-4": { - "App\\": "app/", - "Database\\Factories\\": "database/factories/", - "Database\\Seeders\\": "database/seeders/" - } - }, - "autoload-dev": { - "classmap": [ - "tests/TestCase.php" + "license": "AGPL-3.0-or-later", + "type": "project", + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/grokability/laravel-scim-server" + } ], - "psr-4": { - "App\\": "app/", - "Tests\\": "tests/" + "require": { + "php": "^8.1", + "ext-curl": "*", + "ext-fileinfo": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-pdo": "*", + "alek13/slack": "^2.0", + "arietimmerman/laravel-scim-server": "dev-master", + "bacon/bacon-qr-code": "^2.0", + "barryvdh/laravel-debugbar": "^3.13", + "barryvdh/laravel-dompdf": "^2.0", + "doctrine/cache": "^1.10", + "doctrine/dbal": "^3.1", + "doctrine/instantiator": "^1.3", + "eduardokum/laravel-mail-auto-embed": "^2.0", + "enshrined/svg-sanitize": "^0.15.0", + "erusev/parsedown": "^1.7", + "guzzlehttp/guzzle": "^7.0.1", + "intervention/image": "^2.5", + "javiereguiluz/easyslugger": "^1.0", + "laravel-notification-channels/google-chat": "^3.0", + "laravel-notification-channels/microsoft-teams": "^1.1", + "laravel/framework": "^10.0", + "laravel/helpers": "^1.4", + "laravel/passport": "^11.0", + "laravel/slack-notification-channel": "^2.3", + "laravel/socialite": "^5.6", + "laravel/tinker": "^2.6", + "laravel/ui": "^4.0", + "laravelcollective/html": "^6.2", + "league/csv": "^9.7", + "league/flysystem-aws-s3-v3": "^3.0", + "livewire/livewire": "^3.5", + "neitanod/forceutf8": "^2.0", + "nesbot/carbon": "^2.32", + "nunomaduro/collision": "^7.0", + "okvpn/clock-lts": "^1.0", + "onelogin/php-saml": "^3.4", + "paragonie/constant_time_encoding": "^2.3", + "paragonie/sodium_compat": "^1.19", + "phpdocumentor/reflection-docblock": "^5.1", + "phpspec/prophecy": "^1.10", + "pragmarx/google2fa-laravel": "^1.3", + "rollbar/rollbar-laravel": "^8.0", + "spatie/laravel-backup": "^8.8", + "spatie/laravel-ignition": "^2.0", + "tecnickcom/tc-lib-barcode": "^1.15", + "tecnickcom/tcpdf": "^6.5", + "unicodeveloper/laravel-password": "^1.0", + "watson/validating": "^8.1" + }, + "suggest": { + "ext-ldap": "*", + "ext-zip": "*", + "ext-exif": "*" + }, + "require-dev": { + "brianium/paratest": "^7.0", + "fakerphp/faker": "^1.16", + "larastan/larastan": "^2.9", + "mockery/mockery": "^1.4", + "nunomaduro/phpinsights": "^2.7", + "php-mock/php-mock-phpunit": "^2.10", + "phpunit/phpunit": "^10.0", + "squizlabs/php_codesniffer": "^3.5", + "symfony/css-selector": "^4.4", + "symfony/dom-crawler": "^4.4", + "vimeo/psalm": "^5.13" + }, + "extra": { + "laravel": { + "dont-discover": [ + "rollbar/rollbar-laravel" + ] + } + }, + "autoload": { + "classmap": [ + "database" + ], + "psr-4": { + "App\\": "app/", + "Database\\Factories\\": "database/factories/", + "Database\\Seeders\\": "database/seeders/" + } + }, + "autoload-dev": { + "classmap": [ + "tests/TestCase.php" + ], + "psr-4": { + "App\\": "app/", + "Tests\\": "tests/" + } + }, + "scripts": { + "post-autoload-dump": [ + "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", + "@php artisan package:discover --ansi", + "@php artisan vendor:publish --force --tag=livewire:assets --ansi" + ], + "post-create-project-cmd": [ + "php artisan key:generate" + ] + }, + "config": { + "preferred-install": "dist", + "sort-packages": true, + "optimize-autoloader": true, + "discard-changes": true, + "process-timeout": 3000, + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } } - }, - "scripts": { - "post-autoload-dump": [ - "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", - "@php artisan package:discover --ansi", - "@php artisan vendor:publish --force --tag=livewire:assets --ansi" - ], - "post-create-project-cmd": [ - "php artisan key:generate" - ] - }, - "config": { - "preferred-install": "dist", - "sort-packages": true, - "optimize-autoloader": true, - "discard-changes": true, - "process-timeout": 3000, - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true - } - } } From b680dab5c9bf4d262207a22c657a20ae3724da88 Mon Sep 17 00:00:00 2001 From: Shift Date: Tue, 6 Aug 2024 20:25:19 +0000 Subject: [PATCH 02/12] Ignore PHPUnit cache folder --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 25a887e38d..0715ac0495 100755 --- a/.gitignore +++ b/.gitignore @@ -68,3 +68,5 @@ _ide_helper_models.php storage/ldap_client_tls.cert storage/ldap_client_tls.key /storage/framework/testing + +/.phpunit.cache \ No newline at end of file From 96241cb67c0c09c9500515b06eac01ef1c5ee121 Mon Sep 17 00:00:00 2001 From: Shift Date: Tue, 6 Aug 2024 20:25:21 +0000 Subject: [PATCH 03/12] Adopt PHP attributes in test classes --- tests/Feature/Checkouts/Api/AssetCheckoutTest.php | 3 ++- tests/Feature/Checkouts/Ui/AssetCheckoutTest.php | 3 ++- .../Email/EmailNotificationsUponCheckinTest.php | 5 ++--- .../Webhooks/SlackNotificationsUponCheckinTest.php | 14 +++++++------- .../SlackNotificationsUponCheckoutTest.php | 14 +++++++------- tests/Feature/Settings/ShowSetUpPageTest.php | 5 ++--- tests/Unit/CompanyScopingTest.php | 3 ++- tests/Unit/LdapTest.php | 5 ++--- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/tests/Feature/Checkouts/Api/AssetCheckoutTest.php b/tests/Feature/Checkouts/Api/AssetCheckoutTest.php index f85af9035a..44783aa63c 100644 --- a/tests/Feature/Checkouts/Api/AssetCheckoutTest.php +++ b/tests/Feature/Checkouts/Api/AssetCheckoutTest.php @@ -2,6 +2,7 @@ namespace Tests\Feature\Checkouts\Api; +use PHPUnit\Framework\Attributes\DataProvider; use App\Events\CheckoutableCheckedOut; use App\Models\Asset; use App\Models\Location; @@ -148,7 +149,7 @@ class AssetCheckoutTest extends TestCase ]; } - /** @dataProvider checkoutTargets */ + #[DataProvider('checkoutTargets')] public function testAssetCanBeCheckedOut($data) { ['checkout_type' => $type, 'target' => $target, 'expected_location' => $expectedLocation] = $data(); diff --git a/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php b/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php index 165c6a4194..99e30fdcbb 100644 --- a/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php @@ -2,6 +2,7 @@ namespace Tests\Feature\Checkouts\Ui; +use PHPUnit\Framework\Attributes\DataProvider; use App\Events\CheckoutableCheckedOut; use App\Models\Accessory; use App\Models\Asset; @@ -167,7 +168,7 @@ class AssetCheckoutTest extends TestCase ]; } - /** @dataProvider checkoutTargets */ + #[DataProvider('checkoutTargets')] public function testAssetCanBeCheckedOut($data) { ['checkout_type' => $type, 'target' => $target, 'expected_location' => $expectedLocation] = $data(); diff --git a/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php b/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php index 4ae415f1ee..449f65c7ab 100644 --- a/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php +++ b/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php @@ -2,6 +2,7 @@ namespace Tests\Feature\Notifications\Email; +use PHPUnit\Framework\Attributes\Group; use App\Events\CheckoutableCheckedIn; use App\Models\Asset; use App\Models\User; @@ -9,9 +10,7 @@ use App\Notifications\CheckinAssetNotification; use Illuminate\Support\Facades\Notification; use Tests\TestCase; -/** - * @group notifications - */ +#[Group('notifications')] class EmailNotificationsUponCheckinTest extends TestCase { protected function setUp(): void diff --git a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php index 29bf06d9dc..d6f3857a9c 100644 --- a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php +++ b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php @@ -2,6 +2,8 @@ namespace Tests\Feature\Notifications\Webhooks; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use App\Events\CheckoutableCheckedIn; use App\Models\Accessory; use App\Models\Asset; @@ -16,9 +18,7 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Notification; use Tests\TestCase; -/** - * @group notifications - */ +#[Group('notifications')] class SlackNotificationsUponCheckinTest extends TestCase { protected function setUp(): void @@ -69,7 +69,7 @@ class SlackNotificationsUponCheckinTest extends TestCase $this->assertNoSlackNotificationSent(CheckinAccessoryNotification::class); } - /** @dataProvider assetCheckInTargets */ + #[DataProvider('assetCheckInTargets')] public function testAssetCheckinSendsSlackNotificationWhenSettingEnabled($checkoutTarget) { $this->settings->enableSlackWebhook(); @@ -82,7 +82,7 @@ class SlackNotificationsUponCheckinTest extends TestCase $this->assertSlackNotificationSent(CheckinAssetNotification::class); } - /** @dataProvider assetCheckInTargets */ + #[DataProvider('assetCheckInTargets')] public function testAssetCheckinDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget) { $this->settings->disableSlackWebhook(); @@ -107,7 +107,7 @@ class SlackNotificationsUponCheckinTest extends TestCase Notification::assertNothingSent(); } - /** @dataProvider licenseCheckInTargets */ + #[DataProvider('licenseCheckInTargets')] public function testLicenseCheckinSendsSlackNotificationWhenSettingEnabled($checkoutTarget) { $this->settings->enableSlackWebhook(); @@ -120,7 +120,7 @@ class SlackNotificationsUponCheckinTest extends TestCase $this->assertSlackNotificationSent(CheckinLicenseSeatNotification::class); } - /** @dataProvider licenseCheckInTargets */ + #[DataProvider('licenseCheckInTargets')] public function testLicenseCheckinDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget) { $this->settings->disableSlackWebhook(); diff --git a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php index 048448cad7..753c469778 100644 --- a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php +++ b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php @@ -2,6 +2,8 @@ namespace Tests\Feature\Notifications\Webhooks; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use App\Events\CheckoutableCheckedOut; use App\Models\Accessory; use App\Models\Asset; @@ -18,9 +20,7 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Notification; use Tests\TestCase; -/** - * @group notifications - */ +#[Group('notifications')] class SlackNotificationsUponCheckoutTest extends TestCase { protected function setUp(): void @@ -71,7 +71,7 @@ class SlackNotificationsUponCheckoutTest extends TestCase $this->assertNoSlackNotificationSent(CheckoutAccessoryNotification::class); } - /** @dataProvider assetCheckoutTargets */ + #[DataProvider('assetCheckoutTargets')] public function testAssetCheckoutSendsSlackNotificationWhenSettingEnabled($checkoutTarget) { $this->settings->enableSlackWebhook(); @@ -84,7 +84,7 @@ class SlackNotificationsUponCheckoutTest extends TestCase $this->assertSlackNotificationSent(CheckoutAssetNotification::class); } - /** @dataProvider assetCheckoutTargets */ + #[DataProvider('assetCheckoutTargets')] public function testAssetCheckoutDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget) { $this->settings->disableSlackWebhook(); @@ -133,7 +133,7 @@ class SlackNotificationsUponCheckoutTest extends TestCase $this->assertNoSlackNotificationSent(CheckoutConsumableNotification::class); } - /** @dataProvider licenseCheckoutTargets */ + #[DataProvider('licenseCheckoutTargets')] public function testLicenseCheckoutSendsSlackNotificationWhenSettingEnabled($checkoutTarget) { $this->settings->enableSlackWebhook(); @@ -146,7 +146,7 @@ class SlackNotificationsUponCheckoutTest extends TestCase $this->assertSlackNotificationSent(CheckoutLicenseSeatNotification::class); } - /** @dataProvider licenseCheckoutTargets */ + #[DataProvider('licenseCheckoutTargets')] public function testLicenseCheckoutDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget) { $this->settings->disableSlackWebhook(); diff --git a/tests/Feature/Settings/ShowSetUpPageTest.php b/tests/Feature/Settings/ShowSetUpPageTest.php index 929c41c4ef..196902ac5f 100644 --- a/tests/Feature/Settings/ShowSetUpPageTest.php +++ b/tests/Feature/Settings/ShowSetUpPageTest.php @@ -2,6 +2,7 @@ namespace Tests\Feature\Settings; +use PHPUnit\Framework\Attributes\DataProvider; use App\Http\Controllers\SettingsController; use Illuminate\Database\Events\QueryExecuted; use Illuminate\Http\Client\ConnectionException; @@ -163,9 +164,7 @@ class ShowSetUpPageTest extends TestCase }); } - /** - * @dataProvider willShowErrorWhenDotEnvFileIsAccessibleViaHttpData - */ + #[DataProvider('willShowErrorWhenDotEnvFileIsAccessibleViaHttpData')] public function testWillShowErrorWhenDotEnvFileIsAccessibleViaHttp(int $statusCode): void { $this->preventStrayRequest = false; diff --git a/tests/Unit/CompanyScopingTest.php b/tests/Unit/CompanyScopingTest.php index 3923dd9f7d..aefd5dd016 100644 --- a/tests/Unit/CompanyScopingTest.php +++ b/tests/Unit/CompanyScopingTest.php @@ -2,6 +2,7 @@ namespace Tests\Unit; +use PHPUnit\Framework\Attributes\DataProvider; use App\Models\Accessory; use App\Models\Asset; use App\Models\AssetMaintenance; @@ -27,7 +28,7 @@ class CompanyScopingTest extends TestCase ]; } - /** @dataProvider models */ + #[DataProvider('models')] public function testCompanyScoping($model) { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Unit/LdapTest.php b/tests/Unit/LdapTest.php index 6beb0d2118..65bdbe627c 100644 --- a/tests/Unit/LdapTest.php +++ b/tests/Unit/LdapTest.php @@ -2,12 +2,11 @@ namespace Tests\Unit; +use PHPUnit\Framework\Attributes\Group; use App\Models\Ldap; use Tests\TestCase; -/** - * @group ldap - */ +#[Group('ldap')] class LdapTest extends TestCase { use \phpmock\phpunit\PHPMock; From b1e92ab866e03ac9ac3eb085764d9c5c802396a9 Mon Sep 17 00:00:00 2001 From: Shift Date: Tue, 6 Aug 2024 20:25:21 +0000 Subject: [PATCH 04/12] 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], From 83fb6826eedf7e7adc066b394a616b472b178414 Mon Sep 17 00:00:00 2001 From: Shift Date: Tue, 6 Aug 2024 20:25:22 +0000 Subject: [PATCH 05/12] Add return types to test methods --- .../AssetModels/Api/CreateAssetModelsTest.php | 6 +-- .../AssetModels/Api/IndexAssetModelsTest.php | 8 ++-- .../AssetModels/Api/UpdateAssetModelsTest.php | 12 ++--- .../AssetModels/Ui/CreateAssetModelsTest.php | 6 +-- .../AssetModels/Ui/IndexAssetModelsTest.php | 4 +- .../AssetModels/Ui/UpdateAssetModelsTest.php | 6 +-- tests/Feature/Assets/Api/AssetFilesTest.php | 8 ++-- tests/Feature/Assets/Api/AssetIndexTest.php | 16 +++---- .../Assets/Api/AssetsForSelectListTest.php | 4 +- .../Assets/Api/RequestableAssetTest.php | 6 +-- tests/Feature/Assets/Api/StoreAssetTest.php | 48 +++++++++---------- tests/Feature/Assets/Api/UpdateAssetTest.php | 48 +++++++++---------- .../Assets/Ui/BulkDeleteAssetsTest.php | 16 +++---- .../Feature/Assets/Ui/BulkEditAssetsTest.php | 12 ++--- tests/Feature/Assets/Ui/CloneAssetTest.php | 4 +- tests/Feature/Assets/Ui/EditAssetTest.php | 6 +-- .../Categories/Api/CreateCategoriesTest.php | 8 ++-- .../Categories/Api/IndexCategoriesTest.php | 6 +-- .../Categories/Api/UpdateCategoriesTest.php | 4 +- .../Categories/Ui/CreateCategoriesTest.php | 6 +-- .../Categories/Ui/IndexCategoriesTest.php | 4 +- .../Categories/Ui/UpdateCategoriesTest.php | 10 ++-- .../Feature/Checkins/Api/AssetCheckinTest.php | 20 ++++---- .../Checkins/Ui/AccessoryCheckinTest.php | 8 ++-- .../Feature/Checkins/Ui/AssetCheckinTest.php | 28 +++++------ .../Checkins/Ui/ComponentCheckinTest.php | 6 +-- .../Checkins/Ui/LicenseCheckinTest.php | 2 +- .../Ui/AccessoryAcceptanceTest.php | 6 +-- .../Checkouts/Api/AccessoryCheckoutTest.php | 16 +++---- .../Checkouts/Api/AssetCheckoutTest.php | 18 +++---- .../Checkouts/Api/ConsumableCheckoutTest.php | 12 ++--- .../Checkouts/Ui/AccessoryCheckoutTest.php | 24 +++++----- .../Checkouts/Ui/AssetCheckoutTest.php | 30 ++++++------ .../Checkouts/Ui/ComponentsCheckoutTest.php | 8 ++-- .../Checkouts/Ui/ConsumableCheckoutTest.php | 18 +++---- .../Checkouts/Ui/LicenseCheckoutTest.php | 12 ++--- .../Components/Api/ComponentIndexTest.php | 2 +- .../Components/Ui/ComponentIndexTest.php | 4 +- tests/Feature/Console/MergeUsersTest.php | 2 +- tests/Feature/Console/OptimizeTest.php | 2 +- .../Consumables/Api/ConsumableIndexTest.php | 4 +- .../Consumables/Api/ConsumableUpdateTest.php | 4 +- .../Consumables/Api/ConsumableViewTest.php | 2 +- .../Consumables/Ui/ConsumableIndexTest.php | 4 +- .../Consumables/Ui/ConsumableViewTest.php | 4 +- tests/Feature/DashboardTest.php | 2 +- .../Departments/Api/CreateDepartmentsTest.php | 2 +- .../Departments/Api/DepartmentsIndexTest.php | 8 ++-- .../Departments/Api/UpdateDepartmentsTest.php | 4 +- .../Departments/Ui/CreateDepartmentsTest.php | 4 +- .../Departments/Ui/IndexDepartmentsTest.php | 4 +- .../Departments/Ui/UpdateDepartmentsTest.php | 4 +- tests/Feature/Groups/Api/StoreGroupTest.php | 8 ++-- tests/Feature/Groups/Ui/IndexGroupTest.php | 4 +- .../Feature/Licenses/Api/LicenseIndexTest.php | 2 +- .../Feature/Licenses/Ui/CreateLicenseTest.php | 4 +- .../Feature/Licenses/Ui/LicenseIndexTest.php | 4 +- tests/Feature/Licenses/Ui/LicenseViewTest.php | 4 +- .../Feature/Livewire/CategoryEditFormTest.php | 18 +++---- .../Locations/Api/CreateLocationsTest.php | 6 +-- .../Locations/Api/DeleteLocationsTest.php | 12 ++--- .../Locations/Api/IndexLocationsTest.php | 6 +-- .../Api/LocationsForSelectListTest.php | 6 +-- .../Locations/Api/LocationsViewTest.php | 6 +-- .../Locations/Api/UpdateLocationsTest.php | 4 +- .../Locations/Ui/CreateLocationsTest.php | 4 +- .../Locations/Ui/IndexLocationsTest.php | 4 +- .../Locations/Ui/UpdateLocationsTest.php | 6 +-- .../EmailNotificationsUponCheckinTest.php | 4 +- .../SlackNotificationsUponCheckinTest.php | 14 +++--- .../SlackNotificationsUponCheckoutTest.php | 18 +++---- tests/Feature/Reporting/CustomReportTest.php | 6 +-- .../Reporting/UnacceptedAssetReportTest.php | 4 +- .../Feature/Settings/BrandingSettingsTest.php | 26 +++++----- tests/Feature/Settings/ShowSetUpPageTest.php | 2 +- tests/Feature/Users/Api/DeleteUserTest.php | 18 +++---- tests/Feature/Users/Api/RestoreUserTest.php | 10 ++-- tests/Feature/Users/Api/UpdateUserTest.php | 24 +++++----- tests/Feature/Users/Api/UserSearchTest.php | 12 ++--- .../Users/Api/UsersForSelectListTest.php | 8 ++-- tests/Feature/Users/Api/ViewUserTest.php | 2 +- tests/Feature/Users/Ui/DeleteUserTest.php | 24 +++++----- tests/Feature/Users/Ui/MergeUsersTest.php | 14 +++--- tests/Feature/Users/Ui/UpdateUserTest.php | 10 ++-- tests/Feature/Users/Ui/ViewUserTest.php | 6 +-- tests/Unit/AccessoryTest.php | 8 ++-- tests/Unit/AssetMaintenanceTest.php | 8 ++-- tests/Unit/AssetModelTest.php | 2 +- tests/Unit/AssetTest.php | 18 +++---- tests/Unit/CategoryTest.php | 4 +- tests/Unit/CompanyScopingTest.php | 6 +-- tests/Unit/ComponentTest.php | 6 +-- tests/Unit/CustomFieldTest.php | 18 +++---- tests/Unit/DepreciationTest.php | 4 +- tests/Unit/Helpers/HelperTest.php | 8 ++-- tests/Unit/LdapTest.php | 22 ++++----- tests/Unit/Listeners/LogListenerTest.php | 2 +- tests/Unit/LocationTest.php | 4 +- tests/Unit/Models/Company/CompanyTest.php | 2 +- .../Company/GetIdForCurrentUserTest.php | 8 ++-- tests/Unit/Models/Labels/FieldOptionTest.php | 2 +- tests/Unit/NotificationTest.php | 2 +- tests/Unit/SnipeModelTest.php | 14 +++--- tests/Unit/SnipeTranslatorTest.php | 20 ++++---- tests/Unit/StatuslabelTest.php | 12 ++--- tests/Unit/UserTest.php | 14 +++--- 106 files changed, 498 insertions(+), 498 deletions(-) diff --git a/tests/Feature/AssetModels/Api/CreateAssetModelsTest.php b/tests/Feature/AssetModels/Api/CreateAssetModelsTest.php index a0b1c27b73..9dd0400f64 100644 --- a/tests/Feature/AssetModels/Api/CreateAssetModelsTest.php +++ b/tests/Feature/AssetModels/Api/CreateAssetModelsTest.php @@ -12,14 +12,14 @@ class CreateAssetModelsTest extends TestCase { - public function testRequiresPermissionToCreateAssetModel() + public function testRequiresPermissionToCreateAssetModel(): void { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.models.store')) ->assertForbidden(); } - public function testCanCreateAssetModelWithAssetModelType() + public function testCanCreateAssetModelWithAssetModelType(): void { $response = $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.models.store'), [ @@ -37,7 +37,7 @@ class CreateAssetModelsTest extends TestCase $this->assertEquals('Test AssetModel', $model->name); } - public function testCannotCreateAssetModelWithoutCategory() + public function testCannotCreateAssetModelWithoutCategory(): void { $response = $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.models.store'), [ diff --git a/tests/Feature/AssetModels/Api/IndexAssetModelsTest.php b/tests/Feature/AssetModels/Api/IndexAssetModelsTest.php index 26e4dd75b1..4a672965d6 100644 --- a/tests/Feature/AssetModels/Api/IndexAssetModelsTest.php +++ b/tests/Feature/AssetModels/Api/IndexAssetModelsTest.php @@ -10,19 +10,19 @@ use Tests\TestCase; class IndexAssetModelsTest extends TestCase { - public function testViewingAssetModelIndexRequiresAuthentication() + public function testViewingAssetModelIndexRequiresAuthentication(): void { $this->getJson(route('api.models.index'))->assertRedirect(); } - public function testViewingAssetModelIndexRequiresPermission() + public function testViewingAssetModelIndexRequiresPermission(): void { $this->actingAsForApi(User::factory()->create()) ->getJson(route('api.models.index')) ->assertForbidden(); } - public function testAssetModelIndexReturnsExpectedAssetModels() + public function testAssetModelIndexReturnsExpectedAssetModels(): void { AssetModel::factory()->count(3)->create(); @@ -42,7 +42,7 @@ class IndexAssetModelsTest extends TestCase ->assertJson(fn(AssertableJson $json) => $json->has('rows', 3)->etc()); } - public function testAssetModelIndexSearchReturnsExpectedAssetModels() + public function testAssetModelIndexSearchReturnsExpectedAssetModels(): void { AssetModel::factory()->count(3)->create(); AssetModel::factory()->count(1)->create(['name' => 'Test Model']); diff --git a/tests/Feature/AssetModels/Api/UpdateAssetModelsTest.php b/tests/Feature/AssetModels/Api/UpdateAssetModelsTest.php index c5ec212650..ab42dbdd64 100644 --- a/tests/Feature/AssetModels/Api/UpdateAssetModelsTest.php +++ b/tests/Feature/AssetModels/Api/UpdateAssetModelsTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; class UpdateAssetModelsTest extends TestCase { - public function testRequiresPermissionToEditAssetModel() + public function testRequiresPermissionToEditAssetModel(): void { $model = AssetModel::factory()->create(); $this->actingAsForApi(User::factory()->create()) @@ -18,7 +18,7 @@ class UpdateAssetModelsTest extends TestCase ->assertForbidden(); } - public function testCanUpdateAssetModelViaPatch() + public function testCanUpdateAssetModelViaPatch(): void { $model = AssetModel::factory()->create(); @@ -37,7 +37,7 @@ class UpdateAssetModelsTest extends TestCase } - public function testCannotUpdateAssetModelViaPatchWithAccessoryCategory() + public function testCannotUpdateAssetModelViaPatchWithAccessoryCategory(): void { $category = Category::factory()->forAccessories()->create(); $model = AssetModel::factory()->create(); @@ -57,7 +57,7 @@ class UpdateAssetModelsTest extends TestCase $this->assertNotEquals('category_id', $category->id, 'Category ID was not updated'); } - public function testCannotUpdateAssetModelViaPatchWithLicenseCategory() + public function testCannotUpdateAssetModelViaPatchWithLicenseCategory(): void { $category = Category::factory()->forLicenses()->create(); $model = AssetModel::factory()->create(); @@ -77,7 +77,7 @@ class UpdateAssetModelsTest extends TestCase $this->assertNotEquals('category_id', $category->id, 'Category ID was not updated'); } - public function testCannotUpdateAssetModelViaPatchWithConsumableCategory() + public function testCannotUpdateAssetModelViaPatchWithConsumableCategory(): void { $category = Category::factory()->forConsumables()->create(); $model = AssetModel::factory()->create(); @@ -97,7 +97,7 @@ class UpdateAssetModelsTest extends TestCase $this->assertNotEquals('category_id', $category->id, 'Category ID was not updated'); } - public function testCannotUpdateAssetModelViaPatchWithComponentCategory() + public function testCannotUpdateAssetModelViaPatchWithComponentCategory(): void { $category = Category::factory()->forComponents()->create(); $model = AssetModel::factory()->create(); diff --git a/tests/Feature/AssetModels/Ui/CreateAssetModelsTest.php b/tests/Feature/AssetModels/Ui/CreateAssetModelsTest.php index ef35aa5f6c..a959b66c9f 100644 --- a/tests/Feature/AssetModels/Ui/CreateAssetModelsTest.php +++ b/tests/Feature/AssetModels/Ui/CreateAssetModelsTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class CreateAssetModelsTest extends TestCase { - public function testPermissionRequiredToCreateAssetModel() + public function testPermissionRequiredToCreateAssetModel(): void { $this->actingAs(User::factory()->create()) ->post(route('models.store'), [ @@ -19,7 +19,7 @@ class CreateAssetModelsTest extends TestCase ->assertForbidden(); } - public function testUserCanCreateAssetModels() + public function testUserCanCreateAssetModels(): void { $this->assertFalse(AssetModel::where('name', 'Test Model')->exists()); @@ -33,7 +33,7 @@ class CreateAssetModelsTest extends TestCase $this->assertTrue(AssetModel::where('name', 'Test Model')->exists()); } - public function testUserCannotUseAccessoryCategoryTypeAsAssetModelCategoryType() + public function testUserCannotUseAccessoryCategoryTypeAsAssetModelCategoryType(): void { $response = $this->actingAs(User::factory()->superuser()->create()) diff --git a/tests/Feature/AssetModels/Ui/IndexAssetModelsTest.php b/tests/Feature/AssetModels/Ui/IndexAssetModelsTest.php index 495de30f0a..4e4d6e66cc 100644 --- a/tests/Feature/AssetModels/Ui/IndexAssetModelsTest.php +++ b/tests/Feature/AssetModels/Ui/IndexAssetModelsTest.php @@ -7,14 +7,14 @@ use Tests\TestCase; class IndexAssetModelsTest extends TestCase { - public function testPermissionRequiredToViewAssetModelList() + public function testPermissionRequiredToViewAssetModelList(): void { $this->actingAs(User::factory()->create()) ->get(route('models.index')) ->assertForbidden(); } - public function testUserCanListAssetModels() + public function testUserCanListAssetModels(): void { $this->actingAs(User::factory()->superuser()->create()) ->get(route('models.index')) diff --git a/tests/Feature/AssetModels/Ui/UpdateAssetModelsTest.php b/tests/Feature/AssetModels/Ui/UpdateAssetModelsTest.php index 423eaad574..f3eef58efe 100644 --- a/tests/Feature/AssetModels/Ui/UpdateAssetModelsTest.php +++ b/tests/Feature/AssetModels/Ui/UpdateAssetModelsTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class UpdateAssetModelsTest extends TestCase { - public function testPermissionRequiredToStoreAssetModel() + public function testPermissionRequiredToStoreAssetModel(): void { $this->actingAs(User::factory()->create()) ->post(route('models.store'), [ @@ -20,7 +20,7 @@ class UpdateAssetModelsTest extends TestCase ->assertForbidden(); } - public function testUserCanEditAssetModels() + public function testUserCanEditAssetModels(): void { $category = Category::factory()->forAssets()->create(); $model = AssetModel::factory()->create(['name' => 'Test Model', 'category_id' => $category->id]); @@ -40,7 +40,7 @@ class UpdateAssetModelsTest extends TestCase } - public function testUserCannotChangeAssetModelCategoryType() + public function testUserCannotChangeAssetModelCategoryType(): void { $category = Category::factory()->forAssets()->create(); $model = AssetModel::factory()->create(['name' => 'Test Model', 'category_id' => $category->id]); diff --git a/tests/Feature/Assets/Api/AssetFilesTest.php b/tests/Feature/Assets/Api/AssetFilesTest.php index bc5b6043e4..6f51739135 100644 --- a/tests/Feature/Assets/Api/AssetFilesTest.php +++ b/tests/Feature/Assets/Api/AssetFilesTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class AssetFilesTest extends TestCase { - public function testAssetApiAcceptsFileUpload() + public function testAssetApiAcceptsFileUpload(): void { // Upload a file to an asset @@ -28,7 +28,7 @@ class AssetFilesTest extends TestCase ->assertOk(); } - public function testAssetApiListsFiles() + public function testAssetApiListsFiles(): void { // List all files on an asset @@ -50,7 +50,7 @@ class AssetFilesTest extends TestCase ]); } - public function testAssetApiDownloadsFile() + public function testAssetApiDownloadsFile(): void { // Download a file from an asset @@ -84,7 +84,7 @@ class AssetFilesTest extends TestCase ->assertOk(); } - public function testAssetApiDeletesFile() + public function testAssetApiDeletesFile(): void { // Delete a file from an asset diff --git a/tests/Feature/Assets/Api/AssetIndexTest.php b/tests/Feature/Assets/Api/AssetIndexTest.php index c4a362d28b..4d40ba954a 100644 --- a/tests/Feature/Assets/Api/AssetIndexTest.php +++ b/tests/Feature/Assets/Api/AssetIndexTest.php @@ -11,7 +11,7 @@ use Tests\TestCase; class AssetIndexTest extends TestCase { - public function testAssetApiIndexReturnsExpectedAssets() + public function testAssetApiIndexReturnsExpectedAssets(): void { Asset::factory()->count(3)->create(); @@ -31,7 +31,7 @@ class AssetIndexTest extends TestCase ->assertJson(fn(AssertableJson $json) => $json->has('rows', 3)->etc()); } - public function testAssetApiIndexReturnsDisplayUpcomingAuditsDue() + public function testAssetApiIndexReturnsDisplayUpcomingAuditsDue(): void { Asset::factory()->count(3)->create(['next_audit_date' => Carbon::now()->format('Y-m-d')]); @@ -47,7 +47,7 @@ class AssetIndexTest extends TestCase ->assertJson(fn(AssertableJson $json) => $json->has('rows', 3)->etc()); } - public function testAssetApiIndexReturnsOverdueForAudit() + public function testAssetApiIndexReturnsOverdueForAudit(): void { Asset::factory()->count(3)->create(['next_audit_date' => Carbon::now()->subDays(1)->format('Y-m-d')]); @@ -63,7 +63,7 @@ class AssetIndexTest extends TestCase } - public function testAssetApiIndexReturnsDueOrOverdueForAudit() + public function testAssetApiIndexReturnsDueOrOverdueForAudit(): void { Asset::factory()->count(3)->create(['next_audit_date' => Carbon::now()->format('Y-m-d')]); Asset::factory()->count(2)->create(['next_audit_date' => Carbon::now()->subDays(1)->format('Y-m-d')]); @@ -81,7 +81,7 @@ class AssetIndexTest extends TestCase - public function testAssetApiIndexReturnsDueForExpectedCheckin() + public function testAssetApiIndexReturnsDueForExpectedCheckin(): void { Asset::factory()->count(3)->create(['assigned_to' => '1', 'expected_checkin' => Carbon::now()->format('Y-m-d')]); @@ -97,7 +97,7 @@ class AssetIndexTest extends TestCase ->assertJson(fn(AssertableJson $json) => $json->has('rows', 3)->etc()); } - public function testAssetApiIndexReturnsOverdueForExpectedCheckin() + public function testAssetApiIndexReturnsOverdueForExpectedCheckin(): void { Asset::factory()->count(3)->create(['assigned_to' => '1', 'expected_checkin' => Carbon::now()->subDays(1)->format('Y-m-d')]); @@ -111,7 +111,7 @@ class AssetIndexTest extends TestCase ->assertJson(fn(AssertableJson $json) => $json->has('rows', 3)->etc()); } - public function testAssetApiIndexReturnsDueOrOverdueForExpectedCheckin() + public function testAssetApiIndexReturnsDueOrOverdueForExpectedCheckin(): void { Asset::factory()->count(3)->create(['assigned_to' => '1', 'expected_checkin' => Carbon::now()->subDays(1)->format('Y-m-d')]); Asset::factory()->count(2)->create(['assigned_to' => '1', 'expected_checkin' => Carbon::now()->format('Y-m-d')]); @@ -126,7 +126,7 @@ class AssetIndexTest extends TestCase ->assertJson(fn(AssertableJson $json) => $json->has('rows', 5)->etc()); } - public function testAssetApiIndexAdheresToCompanyScoping() + public function testAssetApiIndexAdheresToCompanyScoping(): void { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Feature/Assets/Api/AssetsForSelectListTest.php b/tests/Feature/Assets/Api/AssetsForSelectListTest.php index de797651e4..603fab6178 100644 --- a/tests/Feature/Assets/Api/AssetsForSelectListTest.php +++ b/tests/Feature/Assets/Api/AssetsForSelectListTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class AssetsForSelectListTest extends TestCase { - public function testAssetsCanBeSearchedForByAssetTag() + public function testAssetsCanBeSearchedForByAssetTag(): void { Asset::factory()->create(['asset_tag' => '0001']); Asset::factory()->create(['asset_tag' => '0002']); @@ -25,7 +25,7 @@ class AssetsForSelectListTest extends TestCase $this->assertTrue($results->pluck('text')->contains(fn($text) => str_contains($text, '0002'))); } - public function testAssetsAreScopedToCompanyWhenMultipleCompanySupportEnabled() + public function testAssetsAreScopedToCompanyWhenMultipleCompanySupportEnabled(): void { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Feature/Assets/Api/RequestableAssetTest.php b/tests/Feature/Assets/Api/RequestableAssetTest.php index d24913ad66..28b916380a 100644 --- a/tests/Feature/Assets/Api/RequestableAssetTest.php +++ b/tests/Feature/Assets/Api/RequestableAssetTest.php @@ -9,14 +9,14 @@ use Tests\TestCase; class RequestableAssetTest extends TestCase { - public function testViewingRequestableAssetsRequiresCorrectPermission() + public function testViewingRequestableAssetsRequiresCorrectPermission(): void { $this->actingAsForApi(User::factory()->create()) ->getJson(route('api.assets.requestable')) ->assertForbidden(); } - public function testReturnsRequestableAssets() + public function testReturnsRequestableAssets(): void { $requestableAsset = Asset::factory()->requestable()->create(['asset_tag' => 'requestable']); $nonRequestableAsset = Asset::factory()->nonrequestable()->create(['asset_tag' => 'non-requestable']); @@ -28,7 +28,7 @@ class RequestableAssetTest extends TestCase ->assertResponseDoesNotContainInRows($nonRequestableAsset, 'asset_tag'); } - public function testRequestableAssetsAreScopedToCompanyWhenMultipleCompanySupportEnabled() + public function testRequestableAssetsAreScopedToCompanyWhenMultipleCompanySupportEnabled(): void { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Feature/Assets/Api/StoreAssetTest.php b/tests/Feature/Assets/Api/StoreAssetTest.php index a3f5981635..5eba2d94b4 100644 --- a/tests/Feature/Assets/Api/StoreAssetTest.php +++ b/tests/Feature/Assets/Api/StoreAssetTest.php @@ -16,14 +16,14 @@ use Tests\TestCase; class StoreAssetTest extends TestCase { - public function testRequiresPermissionToCreateAsset() + public function testRequiresPermissionToCreateAsset(): void { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.assets.store')) ->assertForbidden(); } - public function testAllAssetAttributesAreStored() + public function testAllAssetAttributesAreStored(): void { $company = Company::factory()->create(); $location = Location::factory()->create(); @@ -83,7 +83,7 @@ class StoreAssetTest extends TestCase $this->assertEquals(10, $asset->warranty_months); } - public function testSetsLastAuditDateToMidnightOfProvidedDate() + public function testSetsLastAuditDateToMidnightOfProvidedDate(): void { $response = $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.assets.store'), [ @@ -99,7 +99,7 @@ class StoreAssetTest extends TestCase $this->assertEquals('2023-09-03 00:00:00', $asset->last_audit_date); } - public function testLastAuditDateCanBeNull() + public function testLastAuditDateCanBeNull(): void { $response = $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.assets.store'), [ @@ -115,7 +115,7 @@ class StoreAssetTest extends TestCase $this->assertNull($asset->last_audit_date); } - public function testNonDateUsedForLastAuditDateReturnsValidationError() + public function testNonDateUsedForLastAuditDateReturnsValidationError(): void { $response = $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.assets.store'), [ @@ -129,7 +129,7 @@ class StoreAssetTest extends TestCase $this->assertNotNull($response->json('messages.last_audit_date')); } - public function testArchivedDepreciateAndPhysicalCanBeNull() + public function testArchivedDepreciateAndPhysicalCanBeNull(): void { $model = AssetModel::factory()->ipadModel()->create(); $status = Statuslabel::factory()->create(); @@ -154,7 +154,7 @@ class StoreAssetTest extends TestCase $this->assertEquals(0, $asset->depreciate); } - public function testArchivedDepreciateAndPhysicalCanBeEmpty() + public function testArchivedDepreciateAndPhysicalCanBeEmpty(): void { $model = AssetModel::factory()->ipadModel()->create(); $status = Statuslabel::factory()->create(); @@ -179,7 +179,7 @@ class StoreAssetTest extends TestCase $this->assertEquals(0, $asset->depreciate); } - public function testAssetEolDateIsCalculatedIfPurchaseDateSet() + public function testAssetEolDateIsCalculatedIfPurchaseDateSet(): void { $model = AssetModel::factory()->mbp13Model()->create(); $status = Statuslabel::factory()->create(); @@ -200,7 +200,7 @@ class StoreAssetTest extends TestCase $this->assertEquals('2024-01-01', $asset->asset_eol_date); } - public function testAssetEolDateIsNotCalculatedIfPurchaseDateNotSet() + public function testAssetEolDateIsNotCalculatedIfPurchaseDateNotSet(): void { $model = AssetModel::factory()->mbp13Model()->create(); $status = Statuslabel::factory()->create(); @@ -220,7 +220,7 @@ class StoreAssetTest extends TestCase $this->assertNull($asset->asset_eol_date); } - public function testAssetEolExplicitIsSetIfAssetEolDateIsExplicitlySet() + public function testAssetEolExplicitIsSetIfAssetEolDateIsExplicitlySet(): void { $model = AssetModel::factory()->mbp13Model()->create(); $status = Statuslabel::factory()->create(); @@ -242,7 +242,7 @@ class StoreAssetTest extends TestCase $this->assertTrue($asset->eol_explicit); } - public function testAssetGetsAssetTagWithAutoIncrement() + public function testAssetGetsAssetTagWithAutoIncrement(): void { $model = AssetModel::factory()->create(); $status = Statuslabel::factory()->create(); @@ -262,7 +262,7 @@ class StoreAssetTest extends TestCase $this->assertNotNull($asset->asset_tag); } - public function testAssetCreationFailsWithNoAssetTagOrAutoIncrement() + public function testAssetCreationFailsWithNoAssetTagOrAutoIncrement(): void { $model = AssetModel::factory()->create(); $status = Statuslabel::factory()->create(); @@ -278,7 +278,7 @@ class StoreAssetTest extends TestCase ->assertStatusMessageIs('error'); } - public function testStoresPeriodAsDecimalSeparatorForPurchaseCost() + public function testStoresPeriodAsDecimalSeparatorForPurchaseCost(): void { $this->settings->set([ 'default_currency' => 'USD', @@ -300,7 +300,7 @@ class StoreAssetTest extends TestCase $this->assertEquals(12.34, $asset->purchase_cost); } - public function testStoresPeriodAsCommaSeparatorForPurchaseCost() + public function testStoresPeriodAsCommaSeparatorForPurchaseCost(): void { $this->settings->set([ 'default_currency' => 'EUR', @@ -322,7 +322,7 @@ class StoreAssetTest extends TestCase $this->assertEquals(12.34, $asset->purchase_cost); } - public function testUniqueSerialNumbersIsEnforcedWhenEnabled() + public function testUniqueSerialNumbersIsEnforcedWhenEnabled(): void { $model = AssetModel::factory()->create(); $status = Statuslabel::factory()->create(); @@ -350,7 +350,7 @@ class StoreAssetTest extends TestCase ->assertStatusMessageIs('error'); } - public function testUniqueSerialNumbersIsNotEnforcedWhenDisabled() + public function testUniqueSerialNumbersIsNotEnforcedWhenDisabled(): void { $model = AssetModel::factory()->create(); $status = Statuslabel::factory()->create(); @@ -378,7 +378,7 @@ class StoreAssetTest extends TestCase ->assertStatusMessageIs('success'); } - public function testAssetTagsMustBeUniqueWhenUndeleted() + public function testAssetTagsMustBeUniqueWhenUndeleted(): void { $model = AssetModel::factory()->create(); $status = Statuslabel::factory()->create(); @@ -405,7 +405,7 @@ class StoreAssetTest extends TestCase ->assertStatusMessageIs('error'); } - public function testAssetTagsCanBeDuplicatedIfDeleted() + public function testAssetTagsCanBeDuplicatedIfDeleted(): void { $model = AssetModel::factory()->create(); $status = Statuslabel::factory()->create(); @@ -435,7 +435,7 @@ class StoreAssetTest extends TestCase ->assertStatusMessageIs('success'); } - public function testAnAssetCanBeCheckedOutToUserOnStore() + public function testAnAssetCanBeCheckedOutToUserOnStore(): void { $model = AssetModel::factory()->create(); $status = Statuslabel::factory()->create(); @@ -461,7 +461,7 @@ class StoreAssetTest extends TestCase $this->assertTrue($asset->assignedTo->is($userAssigned)); } - public function testAnAssetCanBeCheckedOutToLocationOnStore() + public function testAnAssetCanBeCheckedOutToLocationOnStore(): void { $model = AssetModel::factory()->create(); $status = Statuslabel::factory()->create(); @@ -487,7 +487,7 @@ class StoreAssetTest extends TestCase $this->assertTrue($asset->location->is($location)); } - public function testAnAssetCanBeCheckedOutToAssetOnStore() + public function testAnAssetCanBeCheckedOutToAssetOnStore(): void { $model = AssetModel::factory()->create(); $status = Statuslabel::factory()->create(); @@ -514,7 +514,7 @@ class StoreAssetTest extends TestCase $this->assertTrue($asset->assignedAssets()->find($response['payload']['id'])->is($apiAsset)); } - public function testCompanyIdNeedsToBeInteger() + public function testCompanyIdNeedsToBeInteger(): void { $this->actingAsForApi(User::factory()->createAssets()->create()) ->postJson(route('api.assets.store'), [ @@ -526,7 +526,7 @@ class StoreAssetTest extends TestCase }); } - public function testEncryptedCustomFieldCanBeStored() + public function testEncryptedCustomFieldCanBeStored(): void { $this->markIncompleteIfMySQL('Custom Fields tests do not work on MySQL'); @@ -550,7 +550,7 @@ class StoreAssetTest extends TestCase $this->assertEquals('This is encrypted field', Crypt::decrypt($asset->{$field->db_column_name()})); } - public function testPermissionNeededToStoreEncryptedField() + public function testPermissionNeededToStoreEncryptedField(): void { // @todo: $this->markTestIncomplete(); diff --git a/tests/Feature/Assets/Api/UpdateAssetTest.php b/tests/Feature/Assets/Api/UpdateAssetTest.php index db5893b4dc..65b89ede26 100644 --- a/tests/Feature/Assets/Api/UpdateAssetTest.php +++ b/tests/Feature/Assets/Api/UpdateAssetTest.php @@ -15,14 +15,14 @@ use Tests\TestCase; class UpdateAssetTest extends TestCase { - public function testThatANonExistentAssetIdReturnsError() + public function testThatANonExistentAssetIdReturnsError(): void { $this->actingAsForApi(User::factory()->editAssets()->createAssets()->create()) ->patchJson(route('api.assets.update', 123456789)) ->assertStatusMessageIs('error'); } - public function testRequiresPermissionToUpdateAsset() + public function testRequiresPermissionToUpdateAsset(): void { $asset = Asset::factory()->create(); @@ -31,7 +31,7 @@ class UpdateAssetTest extends TestCase ->assertForbidden(); } - public function testGivenPermissionUpdateAssetIsAllowed() + public function testGivenPermissionUpdateAssetIsAllowed(): void { $asset = Asset::factory()->create(); @@ -43,7 +43,7 @@ class UpdateAssetTest extends TestCase ->assertOk(); } - public function testAllAssetAttributesAreStored() + public function testAllAssetAttributesAreStored(): void { $asset = Asset::factory()->create(); $user = User::factory()->editAssets()->create(); @@ -103,7 +103,7 @@ class UpdateAssetTest extends TestCase $this->assertEquals('2023-09-03 00:00:00', $updatedAsset->last_audit_date); } - public function testAssetEolDateIsCalculatedIfPurchaseDateUpdated() + public function testAssetEolDateIsCalculatedIfPurchaseDateUpdated(): void { $asset = Asset::factory()->laptopMbp()->noPurchaseOrEolDate()->create(); @@ -120,7 +120,7 @@ class UpdateAssetTest extends TestCase $this->assertEquals('2024-01-01', $asset->asset_eol_date); } - public function testAssetEolDateIsNotCalculatedIfPurchaseDateNotSet() + public function testAssetEolDateIsNotCalculatedIfPurchaseDateNotSet(): void { $asset = Asset::factory()->laptopMbp()->noPurchaseOrEolDate()->create(); @@ -138,7 +138,7 @@ class UpdateAssetTest extends TestCase $this->assertEquals('2022-01-01', $asset->asset_eol_date); } - public function testAssetEolExplicitIsSetIfAssetEolDateIsExplicitlySet() + public function testAssetEolExplicitIsSetIfAssetEolDateIsExplicitlySet(): void { $asset = Asset::factory()->laptopMbp()->create(); @@ -156,7 +156,7 @@ class UpdateAssetTest extends TestCase $this->assertTrue($asset->eol_explicit); } - public function testAssetTagCannotUpdateToNullValue() + public function testAssetTagCannotUpdateToNullValue(): void { $asset = Asset::factory()->laptopMbp()->create(); @@ -168,7 +168,7 @@ class UpdateAssetTest extends TestCase ->assertStatusMessageIs('error'); } - public function testAssetTagCannotUpdateToEmptyStringValue() + public function testAssetTagCannotUpdateToEmptyStringValue(): void { $asset = Asset::factory()->laptopMbp()->create(); @@ -180,7 +180,7 @@ class UpdateAssetTest extends TestCase ->assertStatusMessageIs('error'); } - public function testModelIdCannotUpdateToNullValue() + public function testModelIdCannotUpdateToNullValue(): void { $asset = Asset::factory()->laptopMbp()->create(); @@ -192,7 +192,7 @@ class UpdateAssetTest extends TestCase ->assertStatusMessageIs('error'); } - public function testModelIdCannotUpdateToEmptyStringValue() + public function testModelIdCannotUpdateToEmptyStringValue(): void { $asset = Asset::factory()->laptopMbp()->create(); @@ -204,7 +204,7 @@ class UpdateAssetTest extends TestCase ->assertStatusMessageIs('error'); } - public function testStatusIdCannotUpdateToNullValue() + public function testStatusIdCannotUpdateToNullValue(): void { $asset = Asset::factory()->laptopMbp()->create(); @@ -216,7 +216,7 @@ class UpdateAssetTest extends TestCase ->assertStatusMessageIs('error'); } - public function testStatusIdCannotUpdateToEmptyStringValue() + public function testStatusIdCannotUpdateToEmptyStringValue(): void { $asset = Asset::factory()->laptopMbp()->create(); @@ -228,7 +228,7 @@ class UpdateAssetTest extends TestCase ->assertStatusMessageIs('error'); } - public function testIfRtdLocationIdIsSetWithoutLocationIdAssetReturnsToDefault() + public function testIfRtdLocationIdIsSetWithoutLocationIdAssetReturnsToDefault(): void { $location = Location::factory()->create(); $asset = Asset::factory()->laptopMbp()->create([ @@ -247,7 +247,7 @@ class UpdateAssetTest extends TestCase $this->assertTrue($asset->location->is($rtdLocation)); } - public function testIfLocationAndRtdLocationAreSetLocationIdIsLocation() + public function testIfLocationAndRtdLocationAreSetLocationIdIsLocation(): void { $location = Location::factory()->create(); $asset = Asset::factory()->laptopMbp()->create(); @@ -265,7 +265,7 @@ class UpdateAssetTest extends TestCase $this->assertTrue($asset->location->is($location)); } - public function testEncryptedCustomFieldCanBeUpdated() + public function testEncryptedCustomFieldCanBeUpdated(): void { $this->markIncompleteIfMySQL('Custom Fields tests do not work on MySQL'); @@ -284,7 +284,7 @@ class UpdateAssetTest extends TestCase $this->assertEquals('This is encrypted field', Crypt::decrypt($asset->{$field->db_column_name()})); } - public function testPermissionNeededToUpdateEncryptedField() + public function testPermissionNeededToUpdateEncryptedField(): void { $this->markIncompleteIfMySQL('Custom Fields tests do not work on MySQL'); @@ -308,7 +308,7 @@ class UpdateAssetTest extends TestCase $this->assertEquals("encrypted value should not change", Crypt::decrypt($asset->{$field->db_column_name()})); } - public function testCheckoutToUserOnAssetUpdate() + public function testCheckoutToUserOnAssetUpdate(): void { $asset = Asset::factory()->create(); $user = User::factory()->editAssets()->create(); @@ -327,7 +327,7 @@ class UpdateAssetTest extends TestCase $this->assertEquals($asset->assigned_type, 'App\Models\User'); } - public function testCheckoutToDeletedUserFailsOnAssetUpdate() + public function testCheckoutToDeletedUserFailsOnAssetUpdate(): void { $asset = Asset::factory()->create(); $user = User::factory()->editAssets()->create(); @@ -346,7 +346,7 @@ class UpdateAssetTest extends TestCase $this->assertNull($asset->assigned_type); } - public function testCheckoutToLocationOnAssetUpdate() + public function testCheckoutToLocationOnAssetUpdate(): void { $asset = Asset::factory()->create(); $user = User::factory()->editAssets()->create(); @@ -366,7 +366,7 @@ class UpdateAssetTest extends TestCase } - public function testCheckoutToDeletedLocationFailsOnAssetUpdate() + public function testCheckoutToDeletedLocationFailsOnAssetUpdate(): void { $asset = Asset::factory()->create(); $user = User::factory()->editAssets()->create(); @@ -385,7 +385,7 @@ class UpdateAssetTest extends TestCase $this->assertNull($asset->assigned_type); } - public function testCheckoutAssetOnAssetUpdate() + public function testCheckoutAssetOnAssetUpdate(): void { $asset = Asset::factory()->create(); $user = User::factory()->editAssets()->create(); @@ -406,7 +406,7 @@ class UpdateAssetTest extends TestCase } - public function testCheckoutToDeletedAssetFailsOnAssetUpdate() + public function testCheckoutToDeletedAssetFailsOnAssetUpdate(): void { $asset = Asset::factory()->create(); $user = User::factory()->editAssets()->create(); @@ -425,7 +425,7 @@ class UpdateAssetTest extends TestCase $this->assertNull($asset->assigned_type); } - public function testAssetCannotBeUpdatedByUserInSeparateCompany() + public function testAssetCannotBeUpdatedByUserInSeparateCompany(): void { $this->settings->enableMultipleFullCompanySupport(); diff --git a/tests/Feature/Assets/Ui/BulkDeleteAssetsTest.php b/tests/Feature/Assets/Ui/BulkDeleteAssetsTest.php index d1375c5393..1470341fbd 100644 --- a/tests/Feature/Assets/Ui/BulkDeleteAssetsTest.php +++ b/tests/Feature/Assets/Ui/BulkDeleteAssetsTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; class BulkDeleteAssetsTest extends TestCase { - public function testUserWithPermissionsCanAccessPage() + public function testUserWithPermissionsCanAccessPage(): void { $user = User::factory()->viewAssets()->deleteAssets()->editAssets()->create(); $assets = Asset::factory()->count(2)->create(); @@ -25,7 +25,7 @@ class BulkDeleteAssetsTest extends TestCase ])->assertStatus(200); } - public function testStandardUserCannotAccessPage() + public function testStandardUserCannotAccessPage(): void { $user = User::factory()->create(); $assets = Asset::factory()->count(2)->create(); @@ -38,7 +38,7 @@ class BulkDeleteAssetsTest extends TestCase ])->assertStatus(403); } - public function testPageRedirectFromInterstitialIfNoAssetsSelectedToDelete() + public function testPageRedirectFromInterstitialIfNoAssetsSelectedToDelete(): void { $user = User::factory()->viewAssets()->deleteAssets()->editAssets()->create(); $response = $this->actingAs($user) @@ -52,7 +52,7 @@ class BulkDeleteAssetsTest extends TestCase $this->followRedirects($response)->assertSee('alert-danger'); } - public function testPageRedirectFromInterstitialIfNoAssetsSelectedToRestore() + public function testPageRedirectFromInterstitialIfNoAssetsSelectedToRestore(): void { $user = User::factory()->viewAssets()->deleteAssets()->editAssets()->create(); $response = $this->actingAs($user) @@ -68,7 +68,7 @@ class BulkDeleteAssetsTest extends TestCase } - public function testBulkDeleteSelectedAssetsFromInterstitial() + public function testBulkDeleteSelectedAssetsFromInterstitial(): void { $user = User::factory()->viewAssets()->deleteAssets()->editAssets()->create(); $assets = Asset::factory()->count(2)->create(); @@ -89,7 +89,7 @@ class BulkDeleteAssetsTest extends TestCase $this->followRedirects($response)->assertSee('alert-success'); } - public function testBulkRestoreSelectedAssetsFromInterstitial() + public function testBulkRestoreSelectedAssetsFromInterstitial(): void { $user = User::factory()->viewAssets()->deleteAssets()->editAssets()->create(); $asset = Asset::factory()->deleted()->create(); @@ -116,7 +116,7 @@ class BulkDeleteAssetsTest extends TestCase } - public function testActionLogCreatedUponBulkDelete() + public function testActionLogCreatedUponBulkDelete(): void { $user = User::factory()->viewAssets()->deleteAssets()->editAssets()->create(); $asset = Asset::factory()->create(); @@ -139,7 +139,7 @@ class BulkDeleteAssetsTest extends TestCase ); } - public function testActionLogCreatedUponBulkRestore() + public function testActionLogCreatedUponBulkRestore(): void { $user = User::factory()->viewAssets()->deleteAssets()->editAssets()->create(); $asset = Asset::factory()->deleted()->create(); diff --git a/tests/Feature/Assets/Ui/BulkEditAssetsTest.php b/tests/Feature/Assets/Ui/BulkEditAssetsTest.php index 02d39a7b45..ffc23cf584 100644 --- a/tests/Feature/Assets/Ui/BulkEditAssetsTest.php +++ b/tests/Feature/Assets/Ui/BulkEditAssetsTest.php @@ -14,7 +14,7 @@ use Tests\TestCase; class BulkEditAssetsTest extends TestCase { - public function testUserWithPermissionsCanAccessPage() + public function testUserWithPermissionsCanAccessPage(): void { $user = User::factory()->viewAssets()->editAssets()->create(); $assets = Asset::factory()->count(2)->create(); @@ -29,7 +29,7 @@ class BulkEditAssetsTest extends TestCase ])->assertStatus(200); } - public function testStandardUserCannotAccessPage() + public function testStandardUserCannotAccessPage(): void { $user = User::factory()->create(); $assets = Asset::factory()->count(2)->create(); @@ -44,7 +44,7 @@ class BulkEditAssetsTest extends TestCase ])->assertStatus(403); } - public function testBulkEditAssetsAcceptsAllPossibleAttributes() + public function testBulkEditAssetsAcceptsAllPossibleAttributes(): void { // sets up all needed models and attributes on the assets // this test does not deal with custom fields - will be dealt with in separate cases @@ -109,7 +109,7 @@ class BulkEditAssetsTest extends TestCase }); } - public function testBulkEditAssetsAcceptsAndUpdatesUnencryptedCustomFields() + public function testBulkEditAssetsAcceptsAndUpdatesUnencryptedCustomFields(): void { $this->markIncompleteIfMySQL('Custom Fields tests do not work on MySQL'); @@ -141,7 +141,7 @@ class BulkEditAssetsTest extends TestCase }); } - public function testBulkEditAssetsAcceptsAndUpdatesEncryptedCustomFields() + public function testBulkEditAssetsAcceptsAndUpdatesEncryptedCustomFields(): void { $this->markIncompleteIfMySQL('Custom Fields tests do not work on MySQL'); @@ -165,7 +165,7 @@ class BulkEditAssetsTest extends TestCase }); } - public function testBulkEditAssetsRequiresAdminUserToUpdateEncryptedCustomFields() + public function testBulkEditAssetsRequiresAdminUserToUpdateEncryptedCustomFields(): void { $this->markIncompleteIfMySQL('Custom Fields tests do not work on mysql'); $edit_user = User::factory()->editAssets()->create(); diff --git a/tests/Feature/Assets/Ui/CloneAssetTest.php b/tests/Feature/Assets/Ui/CloneAssetTest.php index 18e1ccc5e5..819f5cd161 100644 --- a/tests/Feature/Assets/Ui/CloneAssetTest.php +++ b/tests/Feature/Assets/Ui/CloneAssetTest.php @@ -8,7 +8,7 @@ use Tests\TestCase; class CloneAssetTest extends TestCase { - public function testPermissionRequiredToCreateAssetModel() + public function testPermissionRequiredToCreateAssetModel(): void { $asset = Asset::factory()->create(); $this->actingAs(User::factory()->create()) @@ -24,7 +24,7 @@ class CloneAssetTest extends TestCase $response->assertStatus(200); } - public function testAssetCanBeCloned() + public function testAssetCanBeCloned(): void { $asset_to_clone = Asset::factory()->create(['name'=>'Asset to clone']); $this->actingAs(User::factory()->createAssets()->create()) diff --git a/tests/Feature/Assets/Ui/EditAssetTest.php b/tests/Feature/Assets/Ui/EditAssetTest.php index 2c19e768b4..2c75649d31 100644 --- a/tests/Feature/Assets/Ui/EditAssetTest.php +++ b/tests/Feature/Assets/Ui/EditAssetTest.php @@ -11,7 +11,7 @@ use Tests\TestCase; class EditAssetTest extends TestCase { - public function testPermissionRequiredToViewLicense() + public function testPermissionRequiredToViewLicense(): void { $asset = Asset::factory()->create(); $this->actingAs(User::factory()->create()) @@ -27,7 +27,7 @@ class EditAssetTest extends TestCase $response->assertStatus(200); } - public function testAssetEditPostIsRedirectedIfRedirectSelectionIsIndex() + public function testAssetEditPostIsRedirectedIfRedirectSelectionIsIndex(): void { $asset = Asset::factory()->assignedToUser()->create(); @@ -45,7 +45,7 @@ class EditAssetTest extends TestCase ->assertRedirect(route('hardware.index')); $this->assertDatabaseHas('assets', ['asset_tag' => 'New Asset Tag']); } - public function testAssetEditPostIsRedirectedIfRedirectSelectionIsItem() + public function testAssetEditPostIsRedirectedIfRedirectSelectionIsItem(): void { $asset = Asset::factory()->create(); diff --git a/tests/Feature/Categories/Api/CreateCategoriesTest.php b/tests/Feature/Categories/Api/CreateCategoriesTest.php index fc464242af..8d2d6d35bf 100644 --- a/tests/Feature/Categories/Api/CreateCategoriesTest.php +++ b/tests/Feature/Categories/Api/CreateCategoriesTest.php @@ -13,14 +13,14 @@ class CreateCategoriesTest extends TestCase { - public function testRequiresPermissionToCreateCategory() + public function testRequiresPermissionToCreateCategory(): void { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.categories.store')) ->assertForbidden(); } - public function testCanCreateCategoryWithValidCategoryType() + public function testCanCreateCategoryWithValidCategoryType(): void { $response = $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.categories.store'), [ @@ -41,7 +41,7 @@ class CreateCategoriesTest extends TestCase $this->assertEquals('accessory', $category->category_type); } - public function testCannotCreateCategoryWithoutCategoryType() + public function testCannotCreateCategoryWithoutCategoryType(): void { $response = $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.categories.store'), [ @@ -59,7 +59,7 @@ class CreateCategoriesTest extends TestCase } - public function testCannotCreateCategoryWithInvalidCategoryType() + public function testCannotCreateCategoryWithInvalidCategoryType(): void { $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.categories.store'), [ diff --git a/tests/Feature/Categories/Api/IndexCategoriesTest.php b/tests/Feature/Categories/Api/IndexCategoriesTest.php index d27bfbb068..04cbb516bc 100644 --- a/tests/Feature/Categories/Api/IndexCategoriesTest.php +++ b/tests/Feature/Categories/Api/IndexCategoriesTest.php @@ -10,14 +10,14 @@ use Tests\TestCase; class IndexCategoriesTest extends TestCase { - public function testViewingCategoryIndexRequiresPermission() + public function testViewingCategoryIndexRequiresPermission(): void { $this->actingAsForApi(User::factory()->create()) ->getJson(route('api.departments.index')) ->assertForbidden(); } - public function testCategoryIndexReturnsExpectedSearchResults() + public function testCategoryIndexReturnsExpectedSearchResults(): void { Category::factory()->count(10)->create(); Category::factory()->count(1)->forAssets()->create(['name' => 'My Test Category']); @@ -43,7 +43,7 @@ class IndexCategoriesTest extends TestCase } - public function testCategoryIndexReturnsExpectedCategories() + public function testCategoryIndexReturnsExpectedCategories(): void { $this->markTestIncomplete('Not sure why the category factory is generating one more than expected here.'); Category::factory()->count(3)->create(); diff --git a/tests/Feature/Categories/Api/UpdateCategoriesTest.php b/tests/Feature/Categories/Api/UpdateCategoriesTest.php index 1a784c1179..ebfdb862d2 100644 --- a/tests/Feature/Categories/Api/UpdateCategoriesTest.php +++ b/tests/Feature/Categories/Api/UpdateCategoriesTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class UpdateCategoriesTest extends TestCase { - public function testCanUpdateCategoryViaPatchWithoutCategoryType() + public function testCanUpdateCategoryViaPatchWithoutCategoryType(): void { $category = Category::factory()->create(); @@ -30,7 +30,7 @@ class UpdateCategoriesTest extends TestCase } - public function testCannotUpdateCategoryViaPatchWithCategoryType() + public function testCannotUpdateCategoryViaPatchWithCategoryType(): void { $category = Category::factory()->create(); diff --git a/tests/Feature/Categories/Ui/CreateCategoriesTest.php b/tests/Feature/Categories/Ui/CreateCategoriesTest.php index 87312ad257..358d3564ce 100644 --- a/tests/Feature/Categories/Ui/CreateCategoriesTest.php +++ b/tests/Feature/Categories/Ui/CreateCategoriesTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class CreateCategoriesTest extends TestCase { - public function testPermissionRequiredToCreateCategories() + public function testPermissionRequiredToCreateCategories(): void { $this->actingAs(User::factory()->create()) ->post(route('categories.store'), [ @@ -19,7 +19,7 @@ class CreateCategoriesTest extends TestCase ->assertForbidden(); } - public function testUserCanCreateCategories() + public function testUserCanCreateCategories(): void { $this->assertFalse(Category::where('name', 'Test Category')->exists()); @@ -33,7 +33,7 @@ class CreateCategoriesTest extends TestCase $this->assertTrue(Category::where('name', 'Test Category')->exists()); } - public function testUserCannotCreateCategoriesWithInvalidType() + public function testUserCannotCreateCategoriesWithInvalidType(): void { $this->assertFalse(Category::where('name', 'Test Category')->exists()); diff --git a/tests/Feature/Categories/Ui/IndexCategoriesTest.php b/tests/Feature/Categories/Ui/IndexCategoriesTest.php index caacba99a9..231377f7cd 100644 --- a/tests/Feature/Categories/Ui/IndexCategoriesTest.php +++ b/tests/Feature/Categories/Ui/IndexCategoriesTest.php @@ -7,14 +7,14 @@ use Tests\TestCase; class IndexCategoriesTest extends TestCase { - public function testPermissionRequiredToViewCategoryList() + public function testPermissionRequiredToViewCategoryList(): void { $this->actingAs(User::factory()->create()) ->get(route('categories.index')) ->assertForbidden(); } - public function testUserCanListCategories() + public function testUserCanListCategories(): void { $this->actingAs(User::factory()->superuser()->create()) ->get(route('categories.index')) diff --git a/tests/Feature/Categories/Ui/UpdateCategoriesTest.php b/tests/Feature/Categories/Ui/UpdateCategoriesTest.php index 98b67c7d32..abe2f3092b 100644 --- a/tests/Feature/Categories/Ui/UpdateCategoriesTest.php +++ b/tests/Feature/Categories/Ui/UpdateCategoriesTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class UpdateCategoriesTest extends TestCase { - public function testPermissionRequiredToStoreCategory() + public function testPermissionRequiredToStoreCategory(): void { $this->actingAs(User::factory()->create()) ->post(route('categories.store'), [ @@ -20,7 +20,7 @@ class UpdateCategoriesTest extends TestCase ->assertForbidden(); } - public function testUserCanCreateCategories() + public function testUserCanCreateCategories(): void { $this->actingAs(User::factory()->superuser()->create()) ->post(route('categories.store'), [ @@ -34,7 +34,7 @@ class UpdateCategoriesTest extends TestCase $this->assertTrue(Category::where('name', 'Test Category')->exists()); } - public function testUserCanEditAssetCategory() + public function testUserCanEditAssetCategory(): void { $category = Category::factory()->forAssets()->create(['name' => 'Test Category']); $this->assertTrue(Category::where('name', 'Test Category')->exists()); @@ -52,7 +52,7 @@ class UpdateCategoriesTest extends TestCase } - public function testUserCanChangeCategoryTypeIfNoAssetsAssociated() + public function testUserCanChangeCategoryTypeIfNoAssetsAssociated(): void { $category = Category::factory()->forAssets()->create(['name' => 'Test Category']); $this->assertTrue(Category::where('name', 'Test Category')->exists()); @@ -72,7 +72,7 @@ class UpdateCategoriesTest extends TestCase } - public function testUserCannotChangeCategoryTypeIfAssetsAreAssociated() + public function testUserCannotChangeCategoryTypeIfAssetsAreAssociated(): void { Asset::factory()->count(5)->laptopMbp()->create(); $category = Category::where('name', 'Laptops')->first(); diff --git a/tests/Feature/Checkins/Api/AssetCheckinTest.php b/tests/Feature/Checkins/Api/AssetCheckinTest.php index 0e041fc73a..d3b068e5b5 100644 --- a/tests/Feature/Checkins/Api/AssetCheckinTest.php +++ b/tests/Feature/Checkins/Api/AssetCheckinTest.php @@ -15,28 +15,28 @@ use Tests\TestCase; class AssetCheckinTest extends TestCase { - public function testCheckingInAssetRequiresCorrectPermission() + public function testCheckingInAssetRequiresCorrectPermission(): void { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.asset.checkin', Asset::factory()->assignedToUser()->create())) ->assertForbidden(); } - public function testCannotCheckInNonExistentAsset() + public function testCannotCheckInNonExistentAsset(): void { $this->actingAsForApi(User::factory()->checkinAssets()->create()) ->postJson(route('api.asset.checkin', ['id' => 'does-not-exist'])) ->assertStatusMessageIs('error'); } - public function testCannotCheckInAssetThatIsNotCheckedOut() + public function testCannotCheckInAssetThatIsNotCheckedOut(): void { $this->actingAsForApi(User::factory()->checkinAssets()->create()) ->postJson(route('api.asset.checkin', Asset::factory()->create()->id)) ->assertStatusMessageIs('error'); } - public function testAssetCanBeCheckedIn() + public function testAssetCanBeCheckedIn(): void { Event::fake([CheckoutableCheckedIn::class]); @@ -76,7 +76,7 @@ class AssetCheckinTest extends TestCase }, 1); } - public function testLocationIsSetToRTDLocationByDefaultUponCheckin() + public function testLocationIsSetToRTDLocationByDefaultUponCheckin(): void { $rtdLocation = Location::factory()->create(); $asset = Asset::factory()->assignedToUser()->create([ @@ -90,7 +90,7 @@ class AssetCheckinTest extends TestCase $this->assertTrue($asset->refresh()->location()->is($rtdLocation)); } - public function testDefaultLocationCanBeUpdatedUponCheckin() + public function testDefaultLocationCanBeUpdatedUponCheckin(): void { $location = Location::factory()->create(); $asset = Asset::factory()->assignedToUser()->create(); @@ -104,7 +104,7 @@ class AssetCheckinTest extends TestCase $this->assertTrue($asset->refresh()->defaultLoc()->is($location)); } - public function testAssetsLicenseSeatsAreClearedUponCheckin() + public function testAssetsLicenseSeatsAreClearedUponCheckin(): void { $asset = Asset::factory()->assignedToUser()->create(); LicenseSeat::factory()->assignedToUser()->for($asset)->create(); @@ -117,7 +117,7 @@ class AssetCheckinTest extends TestCase $this->assertNull($asset->refresh()->licenseseats->first()->assigned_to); } - public function testLegacyLocationValuesSetToZeroAreUpdated() + public function testLegacyLocationValuesSetToZeroAreUpdated(): void { $asset = Asset::factory()->canBeInvalidUponCreation()->assignedToUser()->create([ 'rtd_location_id' => 0, @@ -131,7 +131,7 @@ class AssetCheckinTest extends TestCase $this->assertEquals($asset->location_id, $asset->rtd_location_id); } - public function testPendingCheckoutAcceptancesAreClearedUponCheckin() + public function testPendingCheckoutAcceptancesAreClearedUponCheckin(): void { $asset = Asset::factory()->assignedToUser()->create(); @@ -143,7 +143,7 @@ class AssetCheckinTest extends TestCase $this->assertFalse($acceptance->exists(), 'Acceptance was not deleted'); } - public function testCheckinTimeAndActionLogNoteCanBeSet() + public function testCheckinTimeAndActionLogNoteCanBeSet(): void { Event::fake(); diff --git a/tests/Feature/Checkins/Ui/AccessoryCheckinTest.php b/tests/Feature/Checkins/Ui/AccessoryCheckinTest.php index 7a99b2ab56..4e078a1b49 100644 --- a/tests/Feature/Checkins/Ui/AccessoryCheckinTest.php +++ b/tests/Feature/Checkins/Ui/AccessoryCheckinTest.php @@ -12,7 +12,7 @@ use Tests\TestCase; class AccessoryCheckinTest extends TestCase { - public function testCheckingInAccessoryRequiresCorrectPermission() + public function testCheckingInAccessoryRequiresCorrectPermission(): void { $accessory = Accessory::factory()->checkedOutToUser()->create(); @@ -21,7 +21,7 @@ class AccessoryCheckinTest extends TestCase ->assertForbidden(); } - public function testAccessoryCanBeCheckedIn() + public function testAccessoryCanBeCheckedIn(): void { Event::fake([CheckoutableCheckedIn::class]); @@ -38,7 +38,7 @@ class AccessoryCheckinTest extends TestCase Event::assertDispatched(CheckoutableCheckedIn::class, 1); } - public function testEmailSentToUserIfSettingEnabled() + public function testEmailSentToUserIfSettingEnabled(): void { Notification::fake(); @@ -62,7 +62,7 @@ class AccessoryCheckinTest extends TestCase ); } - public function testEmailNotSentToUserIfSettingDisabled() + public function testEmailNotSentToUserIfSettingDisabled(): void { Notification::fake(); diff --git a/tests/Feature/Checkins/Ui/AssetCheckinTest.php b/tests/Feature/Checkins/Ui/AssetCheckinTest.php index f412d4439e..a03a4c931d 100644 --- a/tests/Feature/Checkins/Ui/AssetCheckinTest.php +++ b/tests/Feature/Checkins/Ui/AssetCheckinTest.php @@ -15,7 +15,7 @@ use Tests\TestCase; class AssetCheckinTest extends TestCase { - public function testCheckingInAssetRequiresCorrectPermission() + public function testCheckingInAssetRequiresCorrectPermission(): void { $this->actingAs(User::factory()->create()) ->post(route('hardware.checkin.store', [ @@ -24,7 +24,7 @@ class AssetCheckinTest extends TestCase ->assertForbidden(); } - public function testCannotCheckInAssetThatIsNotCheckedOut() + public function testCannotCheckInAssetThatIsNotCheckedOut(): void { $this->actingAs(User::factory()->checkinAssets()->create()) ->post(route('hardware.checkin.store', ['assetId' => Asset::factory()->create()->id])) @@ -33,7 +33,7 @@ class AssetCheckinTest extends TestCase ->assertRedirect(route('hardware.index')); } - public function testCannotStoreAssetCheckinThatIsNotCheckedOut() + public function testCannotStoreAssetCheckinThatIsNotCheckedOut(): void { $this->actingAs(User::factory()->checkinAssets()->create()) ->get(route('hardware.checkin.store', ['assetId' => Asset::factory()->create()->id])) @@ -42,7 +42,7 @@ class AssetCheckinTest extends TestCase ->assertRedirect(route('hardware.index')); } - public function testAssetCanBeCheckedIn() + public function testAssetCanBeCheckedIn(): void { Event::fake([CheckoutableCheckedIn::class]); @@ -85,7 +85,7 @@ class AssetCheckinTest extends TestCase }, 1); } - public function testLocationIsSetToRTDLocationByDefaultUponCheckin() + public function testLocationIsSetToRTDLocationByDefaultUponCheckin(): void { $rtdLocation = Location::factory()->create(); $asset = Asset::factory()->assignedToUser()->create([ @@ -99,7 +99,7 @@ class AssetCheckinTest extends TestCase $this->assertTrue($asset->refresh()->location()->is($rtdLocation)); } - public function testDefaultLocationCanBeUpdatedUponCheckin() + public function testDefaultLocationCanBeUpdatedUponCheckin(): void { $location = Location::factory()->create(); $asset = Asset::factory()->assignedToUser()->create(); @@ -113,7 +113,7 @@ class AssetCheckinTest extends TestCase $this->assertTrue($asset->refresh()->defaultLoc()->is($location)); } - public function testAssetsLicenseSeatsAreClearedUponCheckin() + public function testAssetsLicenseSeatsAreClearedUponCheckin(): void { $asset = Asset::factory()->assignedToUser()->create(); LicenseSeat::factory()->assignedToUser()->for($asset)->create(); @@ -126,7 +126,7 @@ class AssetCheckinTest extends TestCase $this->assertNull($asset->refresh()->licenseseats->first()->assigned_to); } - public function testLegacyLocationValuesSetToZeroAreUpdated() + public function testLegacyLocationValuesSetToZeroAreUpdated(): void { $asset = Asset::factory()->canBeInvalidUponCreation()->assignedToUser()->create([ 'rtd_location_id' => 0, @@ -140,7 +140,7 @@ class AssetCheckinTest extends TestCase $this->assertEquals($asset->location_id, $asset->rtd_location_id); } - public function testPendingCheckoutAcceptancesAreClearedUponCheckin() + public function testPendingCheckoutAcceptancesAreClearedUponCheckin(): void { $asset = Asset::factory()->assignedToUser()->create(); @@ -152,7 +152,7 @@ class AssetCheckinTest extends TestCase $this->assertFalse($acceptance->exists(), 'Acceptance was not deleted'); } - public function testCheckinTimeAndActionLogNoteCanBeSet() + public function testCheckinTimeAndActionLogNoteCanBeSet(): void { Event::fake([CheckoutableCheckedIn::class]); @@ -170,7 +170,7 @@ class AssetCheckinTest extends TestCase }, 1); } - public function testAssetCheckinPageIsRedirectedIfModelIsInvalid() + public function testAssetCheckinPageIsRedirectedIfModelIsInvalid(): void { $asset = Asset::factory()->assignedToUser()->create(); @@ -184,7 +184,7 @@ class AssetCheckinTest extends TestCase ->assertRedirect(route('hardware.show',['hardware' => $asset->id])); } - public function testAssetCheckinPagePostIsRedirectedIfModelIsInvalid() + public function testAssetCheckinPagePostIsRedirectedIfModelIsInvalid(): void { $asset = Asset::factory()->assignedToUser()->create(); $asset->model_id = 0; @@ -197,7 +197,7 @@ class AssetCheckinTest extends TestCase ->assertRedirect(route('hardware.show', ['hardware' => $asset->id])); } - public function testAssetCheckinPagePostIsRedirectedIfRedirectSelectionIsIndex() + public function testAssetCheckinPagePostIsRedirectedIfRedirectSelectionIsIndex(): void { $asset = Asset::factory()->assignedToUser()->create(); @@ -210,7 +210,7 @@ class AssetCheckinTest extends TestCase ->assertRedirect(route('hardware.index')); } - public function testAssetCheckinPagePostIsRedirectedIfRedirectSelectionIsItem() + public function testAssetCheckinPagePostIsRedirectedIfRedirectSelectionIsItem(): void { $asset = Asset::factory()->assignedToUser()->create(); diff --git a/tests/Feature/Checkins/Ui/ComponentCheckinTest.php b/tests/Feature/Checkins/Ui/ComponentCheckinTest.php index 1213d65252..0da1282a47 100644 --- a/tests/Feature/Checkins/Ui/ComponentCheckinTest.php +++ b/tests/Feature/Checkins/Ui/ComponentCheckinTest.php @@ -8,7 +8,7 @@ use Tests\TestCase; class ComponentCheckinTest extends TestCase { - public function testCheckingInComponentRequiresCorrectPermission() + public function testCheckingInComponentRequiresCorrectPermission(): void { $this->actingAs(User::factory()->create()) ->post(route('components.checkin.store', [ @@ -18,7 +18,7 @@ class ComponentCheckinTest extends TestCase } - public function testComponentCheckinPagePostIsRedirectedIfRedirectSelectionIsIndex() + public function testComponentCheckinPagePostIsRedirectedIfRedirectSelectionIsIndex(): void { $component = Component::factory()->checkedOutToAsset()->create(); @@ -32,7 +32,7 @@ class ComponentCheckinTest extends TestCase ->assertRedirect(route('components.index')); } - public function testComponentCheckinPagePostIsRedirectedIfRedirectSelectionIsItem() + public function testComponentCheckinPagePostIsRedirectedIfRedirectSelectionIsItem(): void { $component = Component::factory()->checkedOutToAsset()->create(); diff --git a/tests/Feature/Checkins/Ui/LicenseCheckinTest.php b/tests/Feature/Checkins/Ui/LicenseCheckinTest.php index e087cb442d..550f26ad44 100644 --- a/tests/Feature/Checkins/Ui/LicenseCheckinTest.php +++ b/tests/Feature/Checkins/Ui/LicenseCheckinTest.php @@ -8,7 +8,7 @@ use Tests\TestCase; class LicenseCheckinTest extends TestCase { - public function testCheckingInLicenseRequiresCorrectPermission() + public function testCheckingInLicenseRequiresCorrectPermission(): void { $this->actingAs(User::factory()->create()) ->post(route('licenses.checkin.save', [ diff --git a/tests/Feature/CheckoutAcceptances/Ui/AccessoryAcceptanceTest.php b/tests/Feature/CheckoutAcceptances/Ui/AccessoryAcceptanceTest.php index fef38623f8..13e3664548 100644 --- a/tests/Feature/CheckoutAcceptances/Ui/AccessoryAcceptanceTest.php +++ b/tests/Feature/CheckoutAcceptances/Ui/AccessoryAcceptanceTest.php @@ -16,7 +16,7 @@ class AccessoryAcceptanceTest extends TestCase /** * This can be absorbed into a bigger test */ - public function testUsersNameIsIncludedInAccessoryAcceptedNotification() + public function testUsersNameIsIncludedInAccessoryAcceptedNotification(): void { Notification::fake(); @@ -49,7 +49,7 @@ class AccessoryAcceptanceTest extends TestCase /** * This can be absorbed into a bigger test */ - public function testUsersNameIsIncludedInAccessoryDeclinedNotification() + public function testUsersNameIsIncludedInAccessoryDeclinedNotification(): void { Notification::fake(); @@ -79,7 +79,7 @@ class AccessoryAcceptanceTest extends TestCase ); } - public function testUserIsNotAbleToAcceptAnAssetAssignedToADifferentUser() + public function testUserIsNotAbleToAcceptAnAssetAssignedToADifferentUser(): void { Notification::fake(); diff --git a/tests/Feature/Checkouts/Api/AccessoryCheckoutTest.php b/tests/Feature/Checkouts/Api/AccessoryCheckoutTest.php index 2b37797fb6..1b1b1c16bb 100644 --- a/tests/Feature/Checkouts/Api/AccessoryCheckoutTest.php +++ b/tests/Feature/Checkouts/Api/AccessoryCheckoutTest.php @@ -11,14 +11,14 @@ use Tests\TestCase; class AccessoryCheckoutTest extends TestCase { - public function testCheckingOutAccessoryRequiresCorrectPermission() + public function testCheckingOutAccessoryRequiresCorrectPermission(): void { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.accessories.checkout', Accessory::factory()->create())) ->assertForbidden(); } - public function testValidationWhenCheckingOutAccessory() + public function testValidationWhenCheckingOutAccessory(): void { $this->actingAsForApi(User::factory()->checkoutAccessories()->create()) ->postJson(route('api.accessories.checkout', Accessory::factory()->create()), [ @@ -27,7 +27,7 @@ class AccessoryCheckoutTest extends TestCase ->assertStatusMessageIs('error'); } - public function testAccessoryMustBeAvailableWhenCheckingOut() + public function testAccessoryMustBeAvailableWhenCheckingOut(): void { $this->actingAsForApi(User::factory()->checkoutAccessories()->create()) ->postJson(route('api.accessories.checkout', Accessory::factory()->withoutItemsRemaining()->create()), [ @@ -58,7 +58,7 @@ class AccessoryCheckoutTest extends TestCase ->json(); } - public function testAccessoryCanBeCheckedOutWithoutQty() + public function testAccessoryCanBeCheckedOutWithoutQty(): void { $accessory = Accessory::factory()->create(); $user = User::factory()->create(); @@ -90,7 +90,7 @@ class AccessoryCheckoutTest extends TestCase ); } - public function testAccessoryCanBeCheckedOutWithQty() + public function testAccessoryCanBeCheckedOutWithQty(): void { $accessory = Accessory::factory()->create(['qty' => 20]); $user = User::factory()->create(); @@ -124,7 +124,7 @@ class AccessoryCheckoutTest extends TestCase ); } - public function testAccessoryCannotBeCheckedOutToInvalidUser() + public function testAccessoryCannotBeCheckedOutToInvalidUser(): void { $accessory = Accessory::factory()->create(); $user = User::factory()->create(); @@ -143,7 +143,7 @@ class AccessoryCheckoutTest extends TestCase $this->assertFalse($accessory->checkouts()->where('assigned_type', User::class)->where('assigned_to', $user->id)->count() > 0); } - public function testUserSentNotificationUponCheckout() + public function testUserSentNotificationUponCheckout(): void { Notification::fake(); @@ -159,7 +159,7 @@ class AccessoryCheckoutTest extends TestCase Notification::assertSentTo($user, CheckoutAccessoryNotification::class); } - public function testActionLogCreatedUponCheckout() + public function testActionLogCreatedUponCheckout(): void { $accessory = Accessory::factory()->create(); $actor = User::factory()->checkoutAccessories()->create(); diff --git a/tests/Feature/Checkouts/Api/AssetCheckoutTest.php b/tests/Feature/Checkouts/Api/AssetCheckoutTest.php index ded3889642..b66ee2d02b 100644 --- a/tests/Feature/Checkouts/Api/AssetCheckoutTest.php +++ b/tests/Feature/Checkouts/Api/AssetCheckoutTest.php @@ -21,7 +21,7 @@ class AssetCheckoutTest extends TestCase Event::fake([CheckoutableCheckedOut::class]); } - public function testCheckingOutAssetRequiresCorrectPermission() + public function testCheckingOutAssetRequiresCorrectPermission(): void { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.asset.checkout', Asset::factory()->create()), [ @@ -31,7 +31,7 @@ class AssetCheckoutTest extends TestCase ->assertForbidden(); } - public function testNonExistentAssetCannotBeCheckedOut() + public function testNonExistentAssetCannotBeCheckedOut(): void { $this->actingAsForApi(User::factory()->checkoutAssets()->create()) ->postJson(route('api.asset.checkout', 1000), [ @@ -41,7 +41,7 @@ class AssetCheckoutTest extends TestCase ->assertStatusMessageIs('error'); } - public function testAssetNotAvailableForCheckoutCannotBeCheckedOut() + public function testAssetNotAvailableForCheckoutCannotBeCheckedOut(): void { $assetAlreadyCheckedOut = Asset::factory()->assignedToUser()->create(); @@ -53,7 +53,7 @@ class AssetCheckoutTest extends TestCase ->assertStatusMessageIs('error'); } - public function testAssetCannotBeCheckedOutToItself() + public function testAssetCannotBeCheckedOutToItself(): void { $asset = Asset::factory()->create(); @@ -65,7 +65,7 @@ class AssetCheckoutTest extends TestCase ->assertStatusMessageIs('error'); } - public function testValidationWhenCheckingOutAsset() + public function testValidationWhenCheckingOutAsset(): void { $this->actingAsForApi(User::factory()->checkoutAssets()->create()) ->postJson(route('api.asset.checkout', Asset::factory()->create()), []) @@ -74,7 +74,7 @@ class AssetCheckoutTest extends TestCase Event::assertNotDispatched(CheckoutableCheckedOut::class); } - public function testCannotCheckoutAcrossCompaniesWhenFullCompanySupportEnabled() + public function testCannotCheckoutAcrossCompaniesWhenFullCompanySupportEnabled(): void { $this->markTestIncomplete('This is not implemented'); } @@ -150,7 +150,7 @@ class AssetCheckoutTest extends TestCase } #[DataProvider('checkoutTargets')] - public function testAssetCanBeCheckedOut($data) + public function testAssetCanBeCheckedOut($data): void { ['checkout_type' => $type, 'target' => $target, 'expected_location' => $expectedLocation] = $data(); @@ -192,12 +192,12 @@ class AssetCheckoutTest extends TestCase }); } - public function testLicenseSeatsAreAssignedToUserUponCheckout() + public function testLicenseSeatsAreAssignedToUserUponCheckout(): void { $this->markTestIncomplete('This is not implemented'); } - public function testLastCheckoutUsesCurrentDateIfNotProvided() + public function testLastCheckoutUsesCurrentDateIfNotProvided(): void { $asset = Asset::factory()->create(['last_checkout' => now()->subMonth()]); diff --git a/tests/Feature/Checkouts/Api/ConsumableCheckoutTest.php b/tests/Feature/Checkouts/Api/ConsumableCheckoutTest.php index 3bd0212fda..8a060572ec 100644 --- a/tests/Feature/Checkouts/Api/ConsumableCheckoutTest.php +++ b/tests/Feature/Checkouts/Api/ConsumableCheckoutTest.php @@ -11,14 +11,14 @@ use Tests\TestCase; class ConsumableCheckoutTest extends TestCase { - public function testCheckingOutConsumableRequiresCorrectPermission() + public function testCheckingOutConsumableRequiresCorrectPermission(): void { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.consumables.checkout', Consumable::factory()->create())) ->assertForbidden(); } - public function testValidationWhenCheckingOutConsumable() + public function testValidationWhenCheckingOutConsumable(): void { $this->actingAsForApi(User::factory()->checkoutConsumables()->create()) ->postJson(route('api.consumables.checkout', Consumable::factory()->create()), [ @@ -27,7 +27,7 @@ class ConsumableCheckoutTest extends TestCase ->assertStatusMessageIs('error'); } - public function testConsumableMustBeAvailableWhenCheckingOut() + public function testConsumableMustBeAvailableWhenCheckingOut(): void { $this->actingAsForApi(User::factory()->checkoutConsumables()->create()) ->postJson(route('api.consumables.checkout', Consumable::factory()->withoutItemsRemaining()->create()), [ @@ -36,7 +36,7 @@ class ConsumableCheckoutTest extends TestCase ->assertStatusMessageIs('error'); } - public function testConsumableCanBeCheckedOut() + public function testConsumableCanBeCheckedOut(): void { $consumable = Consumable::factory()->create(); $user = User::factory()->create(); @@ -49,7 +49,7 @@ class ConsumableCheckoutTest extends TestCase $this->assertTrue($user->consumables->contains($consumable)); } - public function testUserSentNotificationUponCheckout() + public function testUserSentNotificationUponCheckout(): void { Notification::fake(); @@ -65,7 +65,7 @@ class ConsumableCheckoutTest extends TestCase Notification::assertSentTo($user, CheckoutConsumableNotification::class); } - public function testActionLogCreatedUponCheckout() + public function testActionLogCreatedUponCheckout(): void {$consumable = Consumable::factory()->create(); $actor = User::factory()->checkoutConsumables()->create(); $user = User::factory()->create(); diff --git a/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php b/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php index d4818ffc4b..cefd843880 100644 --- a/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php @@ -13,14 +13,14 @@ use Tests\TestCase; class AccessoryCheckoutTest extends TestCase { - public function testCheckingOutAccessoryRequiresCorrectPermission() + public function testCheckingOutAccessoryRequiresCorrectPermission(): void { $this->actingAs(User::factory()->create()) ->post(route('accessories.checkout.store', Accessory::factory()->create())) ->assertForbidden(); } - public function testValidationWhenCheckingOutAccessory() + public function testValidationWhenCheckingOutAccessory(): void { $accessory = Accessory::factory()->create(); $response = $this->actingAs(User::factory()->superuser()->create()) @@ -35,7 +35,7 @@ class AccessoryCheckoutTest extends TestCase $this->followRedirects($response)->assertSee(trans('general.error')); } - public function testAccessoryMustHaveAvailableItemsForCheckoutWhenCheckingOut() + public function testAccessoryMustHaveAvailableItemsForCheckoutWhenCheckingOut(): void { $accessory = Accessory::factory()->withoutItemsRemaining()->create(); @@ -52,7 +52,7 @@ class AccessoryCheckoutTest extends TestCase $this->followRedirects($response)->assertSee(trans('general.error')); } - public function testAccessoryCanBeCheckedOutWithoutQuantity() + public function testAccessoryCanBeCheckedOutWithoutQuantity(): void { $accessory = Accessory::factory()->create(); $user = User::factory()->create(); @@ -76,7 +76,7 @@ class AccessoryCheckoutTest extends TestCase ]); } - public function testAccessoryCanBeCheckedOutWithQuantity() + public function testAccessoryCanBeCheckedOutWithQuantity(): void { $accessory = Accessory::factory()->create(['qty'=>5]); $user = User::factory()->create(); @@ -102,7 +102,7 @@ class AccessoryCheckoutTest extends TestCase ]); } - public function testAccessoryCanBeCheckedOutToLocationWithQuantity() + public function testAccessoryCanBeCheckedOutToLocationWithQuantity(): void { $accessory = Accessory::factory()->create(['qty'=>5]); $location = Location::factory()->create(); @@ -128,7 +128,7 @@ class AccessoryCheckoutTest extends TestCase ]); } - public function testAccessoryCanBeCheckedOutToAssetWithQuantity() + public function testAccessoryCanBeCheckedOutToAssetWithQuantity(): void { $accessory = Accessory::factory()->create(['qty'=>5]); $asset = Asset::factory()->create(); @@ -154,7 +154,7 @@ class AccessoryCheckoutTest extends TestCase ]); } - public function testUserSentNotificationUponCheckout() + public function testUserSentNotificationUponCheckout(): void { Notification::fake(); @@ -171,7 +171,7 @@ class AccessoryCheckoutTest extends TestCase Notification::assertSentTo($user, CheckoutAccessoryNotification::class); } - public function testActionLogCreatedUponCheckout() + public function testActionLogCreatedUponCheckout(): void { $accessory = Accessory::factory()->create(); $actor = User::factory()->checkoutAccessories()->create(); @@ -200,7 +200,7 @@ class AccessoryCheckoutTest extends TestCase ); } - public function testAccessoryCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex() + public function testAccessoryCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex(): void { $accessory = Accessory::factory()->create(); @@ -216,7 +216,7 @@ class AccessoryCheckoutTest extends TestCase ->assertRedirect(route('accessories.index')); } - public function testAccessoryCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem() + public function testAccessoryCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem(): void { $accessory = Accessory::factory()->create(); @@ -233,7 +233,7 @@ class AccessoryCheckoutTest extends TestCase ->assertRedirect(route('accessories.show', ['accessory' => $accessory->id])); } - public function testAccessoryCheckoutPagePostIsRedirectedIfRedirectSelectionIsTarget() + public function testAccessoryCheckoutPagePostIsRedirectedIfRedirectSelectionIsTarget(): void { $user = User::factory()->create(); $accessory = Accessory::factory()->create(); diff --git a/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php b/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php index f268a9385e..bb191d1ac7 100644 --- a/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php @@ -24,7 +24,7 @@ class AssetCheckoutTest extends TestCase Event::fake([CheckoutableCheckedOut::class]); } - public function testCheckingOutAssetRequiresCorrectPermission() + public function testCheckingOutAssetRequiresCorrectPermission(): void { $this->actingAs(User::factory()->create()) ->post(route('hardware.checkout.store', Asset::factory()->create()), [ @@ -34,7 +34,7 @@ class AssetCheckoutTest extends TestCase ->assertForbidden(); } - public function testNonExistentAssetCannotBeCheckedOut() + public function testNonExistentAssetCannotBeCheckedOut(): void { $this->actingAs(User::factory()->checkoutAssets()->create()) ->post(route('hardware.checkout.store', 1000), [ @@ -48,7 +48,7 @@ class AssetCheckoutTest extends TestCase Event::assertNotDispatched(CheckoutableCheckedOut::class); } - public function testAssetNotAvailableForCheckoutCannotBeCheckedOut() + public function testAssetNotAvailableForCheckoutCannotBeCheckedOut(): void { $assetAlreadyCheckedOut = Asset::factory()->assignedToUser()->create(); @@ -63,7 +63,7 @@ class AssetCheckoutTest extends TestCase Event::assertNotDispatched(CheckoutableCheckedOut::class); } - public function testAssetCannotBeCheckedOutToItself() + public function testAssetCannotBeCheckedOutToItself(): void { $asset = Asset::factory()->create(); @@ -77,7 +77,7 @@ class AssetCheckoutTest extends TestCase Event::assertNotDispatched(CheckoutableCheckedOut::class); } - public function testValidationWhenCheckingOutAsset() + public function testValidationWhenCheckingOutAsset(): void { $this->actingAs(User::factory()->create()) ->post(route('hardware.checkout.store', Asset::factory()->create()), [ @@ -98,7 +98,7 @@ class AssetCheckoutTest extends TestCase Event::assertNotDispatched(CheckoutableCheckedOut::class); } - public function testCannotCheckoutAcrossCompaniesWhenFullCompanySupportEnabled() + public function testCannotCheckoutAcrossCompaniesWhenFullCompanySupportEnabled(): void { $this->settings->enableMultipleFullCompanySupport(); @@ -169,7 +169,7 @@ class AssetCheckoutTest extends TestCase } #[DataProvider('checkoutTargets')] - public function testAssetCanBeCheckedOut($data) + public function testAssetCanBeCheckedOut($data): void { ['checkout_type' => $type, 'target' => $target, 'expected_location' => $expectedLocation] = $data(); @@ -207,7 +207,7 @@ class AssetCheckoutTest extends TestCase }); } - public function testLicenseSeatsAreAssignedToUserUponCheckout() + public function testLicenseSeatsAreAssignedToUserUponCheckout(): void { $asset = Asset::factory()->create(); $seat = LicenseSeat::factory()->assignedToAsset($asset)->create(); @@ -224,7 +224,7 @@ class AssetCheckoutTest extends TestCase $this->assertTrue($user->fresh()->licenses->contains($seat->license)); } - public function testLastCheckoutUsesCurrentDateIfNotProvided() + public function testLastCheckoutUsesCurrentDateIfNotProvided(): void { $asset = Asset::factory()->create(['last_checkout' => now()->subMonth()]); @@ -239,7 +239,7 @@ class AssetCheckoutTest extends TestCase $this->assertTrue(Carbon::parse($asset->last_checkout)->diffInSeconds(now()) < 2); } - public function testAssetCheckoutPageIsRedirectedIfModelIsInvalid() + public function testAssetCheckoutPageIsRedirectedIfModelIsInvalid(): void { $asset = Asset::factory()->create(); @@ -253,7 +253,7 @@ class AssetCheckoutTest extends TestCase ->assertRedirect(route('hardware.show',['hardware' => $asset->id])); } - public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex() + public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex(): void { $asset = Asset::factory()->create(); @@ -268,7 +268,7 @@ class AssetCheckoutTest extends TestCase ->assertRedirect(route('hardware.index')); } - public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem() + public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem(): void { $asset = Asset::factory()->create(); @@ -284,7 +284,7 @@ class AssetCheckoutTest extends TestCase ->assertRedirect(route('hardware.show', ['hardware' => $asset->id])); } - public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsUserTarget() + public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsUserTarget(): void { $user = User::factory()->create(); $asset = Asset::factory()->create(); @@ -301,7 +301,7 @@ class AssetCheckoutTest extends TestCase ->assertRedirect(route('users.show', ['user' => $user])); } - public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsAssetTarget() + public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsAssetTarget(): void { $target = Asset::factory()->create(); $asset = Asset::factory()->create(); @@ -318,7 +318,7 @@ class AssetCheckoutTest extends TestCase ->assertRedirect(route('hardware.show', ['hardware' => $target])); } - public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsLocationTarget() + public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsLocationTarget(): void { $target = Location::factory()->create(); $asset = Asset::factory()->create(); diff --git a/tests/Feature/Checkouts/Ui/ComponentsCheckoutTest.php b/tests/Feature/Checkouts/Ui/ComponentsCheckoutTest.php index da285bebbb..f0d82dbf01 100644 --- a/tests/Feature/Checkouts/Ui/ComponentsCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/ComponentsCheckoutTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class ComponentsCheckoutTest extends TestCase { - public function testCheckingOutComponentRequiresCorrectPermission() + public function testCheckingOutComponentRequiresCorrectPermission(): void { $this->actingAs(User::factory()->create()) ->post(route('components.checkout.store', [ @@ -18,7 +18,7 @@ class ComponentsCheckoutTest extends TestCase ->assertForbidden(); } - public function testComponentCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex() + public function testComponentCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex(): void { $component = Component::factory()->create(); @@ -33,7 +33,7 @@ class ComponentsCheckoutTest extends TestCase ->assertRedirect(route('components.index')); } - public function testComponentCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem() + public function testComponentCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem(): void { $component = Component::factory()->create(); @@ -48,7 +48,7 @@ class ComponentsCheckoutTest extends TestCase ->assertRedirect(route('components.show', ['component' => $component->id])); } - public function testComponentCheckoutPagePostIsRedirectedIfRedirectSelectionIsTarget() + public function testComponentCheckoutPagePostIsRedirectedIfRedirectSelectionIsTarget(): void { $asset = Asset::factory()->create(); $component = Component::factory()->create(); diff --git a/tests/Feature/Checkouts/Ui/ConsumableCheckoutTest.php b/tests/Feature/Checkouts/Ui/ConsumableCheckoutTest.php index 90132fcedf..b27be6d482 100644 --- a/tests/Feature/Checkouts/Ui/ConsumableCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/ConsumableCheckoutTest.php @@ -13,14 +13,14 @@ use Tests\TestCase; class ConsumableCheckoutTest extends TestCase { - public function testCheckingOutConsumableRequiresCorrectPermission() + public function testCheckingOutConsumableRequiresCorrectPermission(): void { $this->actingAs(User::factory()->create()) ->post(route('consumables.checkout.store', Consumable::factory()->create())) ->assertForbidden(); } - public function testValidationWhenCheckingOutConsumable() + public function testValidationWhenCheckingOutConsumable(): void { $this->actingAs(User::factory()->checkoutConsumables()->create()) ->post(route('consumables.checkout.store', Consumable::factory()->create()), [ @@ -29,7 +29,7 @@ class ConsumableCheckoutTest extends TestCase ->assertSessionHas('error'); } - public function testConsumableMustBeAvailableWhenCheckingOut() + public function testConsumableMustBeAvailableWhenCheckingOut(): void { $this->actingAs(User::factory()->checkoutConsumables()->create()) ->post(route('consumables.checkout.store', Consumable::factory()->withoutItemsRemaining()->create()), [ @@ -38,7 +38,7 @@ class ConsumableCheckoutTest extends TestCase ->assertSessionHas('error'); } - public function testConsumableCanBeCheckedOut() + public function testConsumableCanBeCheckedOut(): void { $consumable = Consumable::factory()->create(); $user = User::factory()->create(); @@ -51,7 +51,7 @@ class ConsumableCheckoutTest extends TestCase $this->assertTrue($user->consumables->contains($consumable)); } - public function testUserSentNotificationUponCheckout() + public function testUserSentNotificationUponCheckout(): void { Notification::fake(); @@ -66,7 +66,7 @@ class ConsumableCheckoutTest extends TestCase Notification::assertSentTo($user, CheckoutConsumableNotification::class); } - public function testActionLogCreatedUponCheckout() + public function testActionLogCreatedUponCheckout(): void { $consumable = Consumable::factory()->create(); $actor = User::factory()->checkoutConsumables()->create(); @@ -93,7 +93,7 @@ class ConsumableCheckoutTest extends TestCase ); } - public function testConsumableCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex() + public function testConsumableCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex(): void { $consumable = Consumable::factory()->create(); @@ -108,7 +108,7 @@ class ConsumableCheckoutTest extends TestCase ->assertRedirect(route('consumables.index')); } - public function testConsumableCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem() + public function testConsumableCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem(): void { $consumable = Consumable::factory()->create(); @@ -123,7 +123,7 @@ class ConsumableCheckoutTest extends TestCase ->assertRedirect(route('consumables.show', ['consumable' => $consumable->id])); } - public function testConsumableCheckoutPagePostIsRedirectedIfRedirectSelectionIsTarget() + public function testConsumableCheckoutPagePostIsRedirectedIfRedirectSelectionIsTarget(): void { $user = User::factory()->create(); $consumable = Consumable::factory()->create(); diff --git a/tests/Feature/Checkouts/Ui/LicenseCheckoutTest.php b/tests/Feature/Checkouts/Ui/LicenseCheckoutTest.php index 9511c3ae33..49f0ddae89 100644 --- a/tests/Feature/Checkouts/Ui/LicenseCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/LicenseCheckoutTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; class LicenseCheckoutTest extends TestCase { - public function testNotesAreStoredInActionLogOnCheckoutToAsset() + public function testNotesAreStoredInActionLogOnCheckoutToAsset(): void { $admin = User::factory()->superuser()->create(); $asset = Asset::factory()->create(); @@ -34,7 +34,7 @@ class LicenseCheckoutTest extends TestCase ]); } - public function testNotesAreStoredInActionLogOnCheckoutToUser() + public function testNotesAreStoredInActionLogOnCheckoutToUser(): void { $admin = User::factory()->superuser()->create(); $licenseSeat = LicenseSeat::factory()->create(); @@ -57,7 +57,7 @@ class LicenseCheckoutTest extends TestCase ]); } - public function testLicenseCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex() + public function testLicenseCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex(): void { $license = License::factory()->create(); @@ -72,7 +72,7 @@ class LicenseCheckoutTest extends TestCase ->assertRedirect(route('licenses.index')); } - public function testLicenseCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem() + public function testLicenseCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem(): void { $license = License::factory()->create(); @@ -86,7 +86,7 @@ class LicenseCheckoutTest extends TestCase ->assertRedirect(route('licenses.show', ['license' => $license->id])); } - public function testLicenseCheckoutPagePostIsRedirectedIfRedirectSelectionIsUserTarget() + public function testLicenseCheckoutPagePostIsRedirectedIfRedirectSelectionIsUserTarget(): void { $user = User::factory()->create(); $license = License::factory()->create(); @@ -100,7 +100,7 @@ class LicenseCheckoutTest extends TestCase ->assertStatus(302) ->assertRedirect(route('users.show', ['user' => $user->id])); } - public function testLicenseCheckoutPagePostIsRedirectedIfRedirectSelectionIsAssetTarget() + public function testLicenseCheckoutPagePostIsRedirectedIfRedirectSelectionIsAssetTarget(): void { $asset = Asset::factory()->create(); $license = License::factory()->create(); diff --git a/tests/Feature/Components/Api/ComponentIndexTest.php b/tests/Feature/Components/Api/ComponentIndexTest.php index 4260372c0b..300f0ec8f7 100644 --- a/tests/Feature/Components/Api/ComponentIndexTest.php +++ b/tests/Feature/Components/Api/ComponentIndexTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class ComponentIndexTest extends TestCase { - public function testComponentIndexAdheresToCompanyScoping() + public function testComponentIndexAdheresToCompanyScoping(): void { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Feature/Components/Ui/ComponentIndexTest.php b/tests/Feature/Components/Ui/ComponentIndexTest.php index 41b733e046..1d8e2416ce 100644 --- a/tests/Feature/Components/Ui/ComponentIndexTest.php +++ b/tests/Feature/Components/Ui/ComponentIndexTest.php @@ -7,14 +7,14 @@ use Tests\TestCase; class ComponentIndexTest extends TestCase { - public function testPermissionRequiredToViewComponentsList() + public function testPermissionRequiredToViewComponentsList(): void { $this->actingAs(User::factory()->create()) ->get(route('components.index')) ->assertForbidden(); } - public function testUserCanListComponents() + public function testUserCanListComponents(): void { $this->actingAs(User::factory()->superuser()->create()) ->get(route('components.index')) diff --git a/tests/Feature/Console/MergeUsersTest.php b/tests/Feature/Console/MergeUsersTest.php index 4c43e6293d..cbcc7007cb 100644 --- a/tests/Feature/Console/MergeUsersTest.php +++ b/tests/Feature/Console/MergeUsersTest.php @@ -13,7 +13,7 @@ use Tests\TestCase; class MergeUsersTest extends TestCase { - public function testAssetsAreTransferredOnUserMerge() + public function testAssetsAreTransferredOnUserMerge(): void { $user1 = User::factory()->create(['username' => 'user1']); $user_to_merge_into = User::factory()->create(['username' => 'user1@example.com']); diff --git a/tests/Feature/Console/OptimizeTest.php b/tests/Feature/Console/OptimizeTest.php index 8dd6f270f9..6a3926e308 100644 --- a/tests/Feature/Console/OptimizeTest.php +++ b/tests/Feature/Console/OptimizeTest.php @@ -6,7 +6,7 @@ use Tests\TestCase; class OptimizeTest extends TestCase { - public function testOptimizeSucceeds() + public function testOptimizeSucceeds(): void { $this->beforeApplicationDestroyed(function () { $this->artisan('config:clear'); diff --git a/tests/Feature/Consumables/Api/ConsumableIndexTest.php b/tests/Feature/Consumables/Api/ConsumableIndexTest.php index f1d3ad7f0b..93ea6f54b1 100644 --- a/tests/Feature/Consumables/Api/ConsumableIndexTest.php +++ b/tests/Feature/Consumables/Api/ConsumableIndexTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class ConsumableIndexTest extends TestCase { - public function testConsumableIndexAdheresToCompanyScoping() + public function testConsumableIndexAdheresToCompanyScoping(): void { [$companyA, $companyB] = Company::factory()->count(2)->create(); @@ -55,7 +55,7 @@ class ConsumableIndexTest extends TestCase ->assertResponseContainsInRows($consumableB); } - public function testConsumableIndexReturnsExpectedSearchResults() + public function testConsumableIndexReturnsExpectedSearchResults(): void { Consumable::factory()->count(10)->create(); Consumable::factory()->count(1)->create(['name' => 'My Test Consumable']); diff --git a/tests/Feature/Consumables/Api/ConsumableUpdateTest.php b/tests/Feature/Consumables/Api/ConsumableUpdateTest.php index 1c1e05d4d4..844c11d2c4 100644 --- a/tests/Feature/Consumables/Api/ConsumableUpdateTest.php +++ b/tests/Feature/Consumables/Api/ConsumableUpdateTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; class ConsumableUpdateTest extends TestCase { - public function testCanUpdateConsumableViaPatchWithoutCategoryType() + public function testCanUpdateConsumableViaPatchWithoutCategoryType(): void { $consumable = Consumable::factory()->create(); @@ -28,7 +28,7 @@ class ConsumableUpdateTest extends TestCase } - public function testCannotUpdateConsumableViaPatchWithInvalidCategoryType() + public function testCannotUpdateConsumableViaPatchWithInvalidCategoryType(): void { $category = Category::factory()->create(['category_type' => 'asset']); $consumable = Consumable::factory()->create(); diff --git a/tests/Feature/Consumables/Api/ConsumableViewTest.php b/tests/Feature/Consumables/Api/ConsumableViewTest.php index c6410216e1..d9218222a9 100644 --- a/tests/Feature/Consumables/Api/ConsumableViewTest.php +++ b/tests/Feature/Consumables/Api/ConsumableViewTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class ConsumableViewTest extends TestCase { - public function testConsumableViewAdheresToCompanyScoping() + public function testConsumableViewAdheresToCompanyScoping(): void { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Feature/Consumables/Ui/ConsumableIndexTest.php b/tests/Feature/Consumables/Ui/ConsumableIndexTest.php index 3c438187ca..16797c4ec0 100644 --- a/tests/Feature/Consumables/Ui/ConsumableIndexTest.php +++ b/tests/Feature/Consumables/Ui/ConsumableIndexTest.php @@ -7,14 +7,14 @@ use Tests\TestCase; class ConsumableIndexTest extends TestCase { - public function testPermissionRequiredToViewConsumablesList() + public function testPermissionRequiredToViewConsumablesList(): void { $this->actingAs(User::factory()->create()) ->get(route('consumables.index')) ->assertForbidden(); } - public function testUserCanListConsumables() + public function testUserCanListConsumables(): void { $this->actingAs(User::factory()->superuser()->create()) ->get(route('consumables.index')) diff --git a/tests/Feature/Consumables/Ui/ConsumableViewTest.php b/tests/Feature/Consumables/Ui/ConsumableViewTest.php index 9633896c2d..394be170db 100644 --- a/tests/Feature/Consumables/Ui/ConsumableViewTest.php +++ b/tests/Feature/Consumables/Ui/ConsumableViewTest.php @@ -8,7 +8,7 @@ use Tests\TestCase; class ConsumableViewTest extends TestCase { - public function testPermissionRequiredToViewConsumable() + public function testPermissionRequiredToViewConsumable(): void { $consumable = Consumable::factory()->create(); $this->actingAs(User::factory()->create()) @@ -16,7 +16,7 @@ class ConsumableViewTest extends TestCase ->assertForbidden(); } - public function testUserCanListConsumables() + public function testUserCanListConsumables(): void { $consumable = Consumable::factory()->create(); $this->actingAs(User::factory()->superuser()->create()) diff --git a/tests/Feature/DashboardTest.php b/tests/Feature/DashboardTest.php index 4690a13901..6857ace7dd 100644 --- a/tests/Feature/DashboardTest.php +++ b/tests/Feature/DashboardTest.php @@ -7,7 +7,7 @@ use Tests\TestCase; class DashboardTest extends TestCase { - public function testUsersWithoutAdminAccessAreRedirected() + public function testUsersWithoutAdminAccessAreRedirected(): void { $this->actingAs(User::factory()->create()) ->get(route('home')) diff --git a/tests/Feature/Departments/Api/CreateDepartmentsTest.php b/tests/Feature/Departments/Api/CreateDepartmentsTest.php index a8725c5ff2..bda4711963 100644 --- a/tests/Feature/Departments/Api/CreateDepartmentsTest.php +++ b/tests/Feature/Departments/Api/CreateDepartmentsTest.php @@ -13,7 +13,7 @@ class CreateDepartmentsTest extends TestCase { - public function testRequiresPermissionToCreateDepartment() + public function testRequiresPermissionToCreateDepartment(): void { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.departments.store')) diff --git a/tests/Feature/Departments/Api/DepartmentsIndexTest.php b/tests/Feature/Departments/Api/DepartmentsIndexTest.php index e3616e2491..7837199025 100644 --- a/tests/Feature/Departments/Api/DepartmentsIndexTest.php +++ b/tests/Feature/Departments/Api/DepartmentsIndexTest.php @@ -10,19 +10,19 @@ use Tests\TestCase; class DepartmentsIndexTest extends TestCase { - public function testViewingDepartmentIndexRequiresAuthentication() + public function testViewingDepartmentIndexRequiresAuthentication(): void { $this->getJson(route('api.departments.index'))->assertRedirect(); } - public function testViewingDepartmentIndexRequiresPermission() + public function testViewingDepartmentIndexRequiresPermission(): void { $this->actingAsForApi(User::factory()->create()) ->getJson(route('api.departments.index')) ->assertForbidden(); } - public function testDepartmentIndexReturnsExpectedDepartments() + public function testDepartmentIndexReturnsExpectedDepartments(): void { Department::factory()->count(3)->create(); @@ -42,7 +42,7 @@ class DepartmentsIndexTest extends TestCase ->assertJson(fn(AssertableJson $json) => $json->has('rows', 3)->etc()); } - public function testDepartmentIndexAdheresToCompanyScoping() + public function testDepartmentIndexAdheresToCompanyScoping(): void { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Feature/Departments/Api/UpdateDepartmentsTest.php b/tests/Feature/Departments/Api/UpdateDepartmentsTest.php index 2a6401e7f1..654408755c 100644 --- a/tests/Feature/Departments/Api/UpdateDepartmentsTest.php +++ b/tests/Feature/Departments/Api/UpdateDepartmentsTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; class UpdateDepartmentsTest extends TestCase { - public function testRequiresPermissionToEditDepartment() + public function testRequiresPermissionToEditDepartment(): void { $department = Department::factory()->create(); $this->actingAsForApi(User::factory()->create()) @@ -18,7 +18,7 @@ class UpdateDepartmentsTest extends TestCase ->assertForbidden(); } - public function testCanUpdateDepartmentViaPatch() + public function testCanUpdateDepartmentViaPatch(): void { $department = Department::factory()->create(); diff --git a/tests/Feature/Departments/Ui/CreateDepartmentsTest.php b/tests/Feature/Departments/Ui/CreateDepartmentsTest.php index 17045cbc0b..ea4fdb674e 100644 --- a/tests/Feature/Departments/Ui/CreateDepartmentsTest.php +++ b/tests/Feature/Departments/Ui/CreateDepartmentsTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class CreateDepartmentsTest extends TestCase { - public function testPermissionRequiredToCreateDepartment() + public function testPermissionRequiredToCreateDepartment(): void { $this->actingAs(User::factory()->create()) ->post(route('departments.store'), [ @@ -19,7 +19,7 @@ class CreateDepartmentsTest extends TestCase ->assertForbidden(); } - public function testUserCanCreateDepartments() + public function testUserCanCreateDepartments(): void { $this->assertFalse(Department::where('name', 'Test Department')->exists()); diff --git a/tests/Feature/Departments/Ui/IndexDepartmentsTest.php b/tests/Feature/Departments/Ui/IndexDepartmentsTest.php index 461ec8fffb..e35511b1ff 100644 --- a/tests/Feature/Departments/Ui/IndexDepartmentsTest.php +++ b/tests/Feature/Departments/Ui/IndexDepartmentsTest.php @@ -7,14 +7,14 @@ use Tests\TestCase; class IndexDepartmentsTest extends TestCase { - public function testPermissionRequiredToViewDepartmentsList() + public function testPermissionRequiredToViewDepartmentsList(): void { $this->actingAs(User::factory()->create()) ->get(route('departments.index')) ->assertForbidden(); } - public function testUserCanListDepartments() + public function testUserCanListDepartments(): void { $this->actingAs(User::factory()->superuser()->create()) ->get(route('departments.index')) diff --git a/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php b/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php index e6e614d32c..919835e0a7 100644 --- a/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php +++ b/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class UpdateDepartmentsTest extends TestCase { - public function testPermissionRequiredToStoreDepartment() + public function testPermissionRequiredToStoreDepartment(): void { $this->actingAs(User::factory()->create()) ->post(route('departments.store'), [ @@ -20,7 +20,7 @@ class UpdateDepartmentsTest extends TestCase } - public function testUserCanEditDepartments() + public function testUserCanEditDepartments(): void { $department = Department::factory()->create(['name' => 'Test Department']); $this->assertTrue(Department::where('name', 'Test Department')->exists()); diff --git a/tests/Feature/Groups/Api/StoreGroupTest.php b/tests/Feature/Groups/Api/StoreGroupTest.php index ebcbff71c5..7619c5df69 100644 --- a/tests/Feature/Groups/Api/StoreGroupTest.php +++ b/tests/Feature/Groups/Api/StoreGroupTest.php @@ -9,14 +9,14 @@ use Tests\TestCase; class StoreGroupTest extends TestCase { - public function testStoringGroupRequiresSuperAdminPermission() + public function testStoringGroupRequiresSuperAdminPermission(): void { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.groups.store')) ->assertForbidden(); } - public function testCanStoreGroupWithPermissionsPassed() + public function testCanStoreGroupWithPermissionsPassed(): void { $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.groups.store'), [ @@ -37,7 +37,7 @@ class StoreGroupTest extends TestCase $this->assertEquals('0', $group->decodePermissions()['reports.view']); } - public function testStoringGroupWithoutPermissionPassed() + public function testStoringGroupWithoutPermissionPassed(): void { $superuser = User::factory()->superuser()->create(); $this->actingAsForApi($superuser) @@ -61,7 +61,7 @@ class StoreGroupTest extends TestCase ->assertOk(); } - public function testStoringGroupWithInvalidPermissionDropsBadPermission() + public function testStoringGroupWithInvalidPermissionDropsBadPermission(): void { $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.groups.store'), [ diff --git a/tests/Feature/Groups/Ui/IndexGroupTest.php b/tests/Feature/Groups/Ui/IndexGroupTest.php index a2d67f903c..29ba058d14 100644 --- a/tests/Feature/Groups/Ui/IndexGroupTest.php +++ b/tests/Feature/Groups/Ui/IndexGroupTest.php @@ -7,7 +7,7 @@ use Tests\TestCase; class IndexGroupTest extends TestCase { - public function testPermissionRequiredToViewGroupList() + public function testPermissionRequiredToViewGroupList(): void { $this->actingAs(User::factory()->create()) ->get(route('groups.index')) @@ -16,7 +16,7 @@ class IndexGroupTest extends TestCase //$this->followRedirects($response)->assertSee('sad-panda.png'); } - public function testUserCanListGroups() + public function testUserCanListGroups(): void { $this->actingAs(User::factory()->superuser()->create()) ->get(route('groups.index')) diff --git a/tests/Feature/Licenses/Api/LicenseIndexTest.php b/tests/Feature/Licenses/Api/LicenseIndexTest.php index 1df7864278..621489f8e7 100644 --- a/tests/Feature/Licenses/Api/LicenseIndexTest.php +++ b/tests/Feature/Licenses/Api/LicenseIndexTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class LicenseIndexTest extends TestCase { - public function testLicensesIndexAdheresToCompanyScoping() + public function testLicensesIndexAdheresToCompanyScoping(): void { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Feature/Licenses/Ui/CreateLicenseTest.php b/tests/Feature/Licenses/Ui/CreateLicenseTest.php index f24c3bd2ce..c07818f01b 100644 --- a/tests/Feature/Licenses/Ui/CreateLicenseTest.php +++ b/tests/Feature/Licenses/Ui/CreateLicenseTest.php @@ -11,7 +11,7 @@ use Tests\TestCase; class CreateLicenseTest extends TestCase { - public function testPermissionRequiredToViewLicense() + public function testPermissionRequiredToViewLicense(): void { $license = License::factory()->create(); $this->actingAs(User::factory()->create()) @@ -21,7 +21,7 @@ class CreateLicenseTest extends TestCase - public function testLicenseWithoutPurchaseDateFailsValidation() + public function testLicenseWithoutPurchaseDateFailsValidation(): void { $response = $this->actingAs(User::factory()->superuser()->create()) ->from(route('licenses.create')) diff --git a/tests/Feature/Licenses/Ui/LicenseIndexTest.php b/tests/Feature/Licenses/Ui/LicenseIndexTest.php index 3eb33e5ee4..a370b8e864 100644 --- a/tests/Feature/Licenses/Ui/LicenseIndexTest.php +++ b/tests/Feature/Licenses/Ui/LicenseIndexTest.php @@ -7,14 +7,14 @@ use Tests\TestCase; class LicenseIndexTest extends TestCase { - public function testPermissionRequiredToViewLicenseList() + public function testPermissionRequiredToViewLicenseList(): void { $this->actingAs(User::factory()->create()) ->get(route('licenses.index')) ->assertForbidden(); } - public function testUserCanListLicenses() + public function testUserCanListLicenses(): void { $this->actingAs(User::factory()->superuser()->create()) ->get(route('licenses.index')) diff --git a/tests/Feature/Licenses/Ui/LicenseViewTest.php b/tests/Feature/Licenses/Ui/LicenseViewTest.php index 3b1f7830d4..d0dd215ee4 100644 --- a/tests/Feature/Licenses/Ui/LicenseViewTest.php +++ b/tests/Feature/Licenses/Ui/LicenseViewTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class LicenseViewTest extends TestCase { - public function testPermissionRequiredToViewLicense() + public function testPermissionRequiredToViewLicense(): void { $license = License::factory()->create(); $this->actingAs(User::factory()->create()) @@ -17,7 +17,7 @@ class LicenseViewTest extends TestCase ->assertForbidden(); } - public function testLicenseWithPurchaseDateDepreciatesCorrectly() + public function testLicenseWithPurchaseDateDepreciatesCorrectly(): void { $depreciation = Depreciation::factory()->create(['months' => 12]); $license = License::factory()->create(['depreciation_id' => $depreciation->id, 'purchase_date' => '2020-01-01']); diff --git a/tests/Feature/Livewire/CategoryEditFormTest.php b/tests/Feature/Livewire/CategoryEditFormTest.php index a439f544ac..8f0948051c 100644 --- a/tests/Feature/Livewire/CategoryEditFormTest.php +++ b/tests/Feature/Livewire/CategoryEditFormTest.php @@ -8,12 +8,12 @@ use Tests\TestCase; class CategoryEditFormTest extends TestCase { - public function testTheComponentCanRender() + public function testTheComponentCanRender(): void { Livewire::test(CategoryEditForm::class)->assertStatus(200); } - public function testSendEmailCheckboxIsCheckedOnLoadWhenSendEmailIsExistingSetting() + public function testSendEmailCheckboxIsCheckedOnLoadWhenSendEmailIsExistingSetting(): void { Livewire::test(CategoryEditForm::class, [ 'sendCheckInEmail' => true, @@ -22,7 +22,7 @@ class CategoryEditFormTest extends TestCase ])->assertSet('sendCheckInEmail', true); } - public function testSendEmailCheckboxIsCheckedOnLoadWhenCategoryEulaSet() + public function testSendEmailCheckboxIsCheckedOnLoadWhenCategoryEulaSet(): void { Livewire::test(CategoryEditForm::class, [ 'sendCheckInEmail' => false, @@ -31,7 +31,7 @@ class CategoryEditFormTest extends TestCase ])->assertSet('sendCheckInEmail', true); } - public function testSendEmailCheckboxIsCheckedOnLoadWhenUsingDefaultEula() + public function testSendEmailCheckboxIsCheckedOnLoadWhenUsingDefaultEula(): void { Livewire::test(CategoryEditForm::class, [ 'sendCheckInEmail' => false, @@ -40,7 +40,7 @@ class CategoryEditFormTest extends TestCase ])->assertSet('sendCheckInEmail', true); } - public function testSendEmailCheckBoxIsUncheckedOnLoadWhenSendEmailIsFalseNoCategoryEulaSetAndNotUsingDefaultEula() + public function testSendEmailCheckBoxIsUncheckedOnLoadWhenSendEmailIsFalseNoCategoryEulaSetAndNotUsingDefaultEula(): void { Livewire::test(CategoryEditForm::class, [ 'sendCheckInEmail' => false, @@ -49,7 +49,7 @@ class CategoryEditFormTest extends TestCase ])->assertSet('sendCheckInEmail', false); } - public function testSendEmailCheckboxIsCheckedWhenCategoryEulaEntered() + public function testSendEmailCheckboxIsCheckedWhenCategoryEulaEntered(): void { Livewire::test(CategoryEditForm::class, [ 'sendCheckInEmail' => false, @@ -59,7 +59,7 @@ class CategoryEditFormTest extends TestCase ->assertSet('sendCheckInEmail', true); } - public function testSendEmailCheckboxCheckedAndDisabledAndEulaTextDisabledWhenUseDefaultEulaSelected() + public function testSendEmailCheckboxCheckedAndDisabledAndEulaTextDisabledWhenUseDefaultEulaSelected(): void { Livewire::test(CategoryEditForm::class, [ 'sendCheckInEmail' => false, @@ -71,7 +71,7 @@ class CategoryEditFormTest extends TestCase ->assertSet('sendCheckInEmailDisabled', true); } - public function testSendEmailCheckboxEnabledAndSetToOriginalValueWhenNoCategoryEulaAndNotUsingGlobalEula() + public function testSendEmailCheckboxEnabledAndSetToOriginalValueWhenNoCategoryEulaAndNotUsingGlobalEula(): void { Livewire::test(CategoryEditForm::class, [ 'eulaText' => 'Some Content', @@ -94,7 +94,7 @@ class CategoryEditFormTest extends TestCase ->assertSet('sendCheckInEmailDisabled', false); } - public function testEulaFieldEnabledOnLoadWhenNotUsingDefaultEula() + public function testEulaFieldEnabledOnLoadWhenNotUsingDefaultEula(): void { Livewire::test(CategoryEditForm::class, [ 'sendCheckInEmail' => false, diff --git a/tests/Feature/Locations/Api/CreateLocationsTest.php b/tests/Feature/Locations/Api/CreateLocationsTest.php index 171508b725..6903c8dada 100644 --- a/tests/Feature/Locations/Api/CreateLocationsTest.php +++ b/tests/Feature/Locations/Api/CreateLocationsTest.php @@ -9,14 +9,14 @@ use Tests\TestCase; class CreateLocationsTest extends TestCase { - public function testRequiresPermissionToCreateLocation() + public function testRequiresPermissionToCreateLocation(): void { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.departments.store')) ->assertForbidden(); } - public function testCannotCreateNewLocationsWithTheSameName() + public function testCannotCreateNewLocationsWithTheSameName(): void { $location = Location::factory()->create(); $location2 = Location::factory()->create(); @@ -33,7 +33,7 @@ class CreateLocationsTest extends TestCase } - public function testUserCannotCreateLocationsThatAreTheirOwnParent() + public function testUserCannotCreateLocationsThatAreTheirOwnParent(): void { $location = Location::factory()->create(); diff --git a/tests/Feature/Locations/Api/DeleteLocationsTest.php b/tests/Feature/Locations/Api/DeleteLocationsTest.php index 270582c901..4041aa1216 100644 --- a/tests/Feature/Locations/Api/DeleteLocationsTest.php +++ b/tests/Feature/Locations/Api/DeleteLocationsTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; class DeleteLocationsTest extends TestCase { - public function testErrorReturnedViaApiIfLocationDoesNotExist() + public function testErrorReturnedViaApiIfLocationDoesNotExist(): void { $this->actingAsForApi(User::factory()->superuser()->create()) ->deleteJson(route('api.users.destroy', 'invalid-id')) @@ -20,7 +20,7 @@ class DeleteLocationsTest extends TestCase ->json(); } - public function testErrorReturnedViaApiIfLocationIsAlreadyDeleted() + public function testErrorReturnedViaApiIfLocationIsAlreadyDeleted(): void { $location = Location::factory()->deletedLocation()->create(); $this->actingAsForApi(User::factory()->superuser()->create()) @@ -31,7 +31,7 @@ class DeleteLocationsTest extends TestCase ->json(); } - public function testDisallowLocationDeletionViaApiIfStillHasPeople() + public function testDisallowLocationDeletionViaApiIfStillHasPeople(): void { $location = Location::factory()->create(); User::factory()->count(5)->create(['location_id' => $location->id]); @@ -46,7 +46,7 @@ class DeleteLocationsTest extends TestCase ->json(); } - public function testDisallowUserDeletionViaApiIfStillHasChildLocations() + public function testDisallowUserDeletionViaApiIfStillHasChildLocations(): void { $parent = Location::factory()->create(); Location::factory()->count(5)->create(['parent_id' => $parent->id]); @@ -60,7 +60,7 @@ class DeleteLocationsTest extends TestCase ->json(); } - public function testDisallowUserDeletionViaApiIfStillHasAssetsAssigned() + public function testDisallowUserDeletionViaApiIfStillHasAssetsAssigned(): void { $location = Location::factory()->create(); Asset::factory()->count(5)->assignedToLocation($location)->create(); @@ -75,7 +75,7 @@ class DeleteLocationsTest extends TestCase ->json(); } - public function testDisallowUserDeletionViaApiIfStillHasAssetsAsLocation() + public function testDisallowUserDeletionViaApiIfStillHasAssetsAsLocation(): void { $location = Location::factory()->create(); Asset::factory()->count(5)->create(['location_id' => $location->id]); diff --git a/tests/Feature/Locations/Api/IndexLocationsTest.php b/tests/Feature/Locations/Api/IndexLocationsTest.php index 7b3b104638..d9dec89c83 100644 --- a/tests/Feature/Locations/Api/IndexLocationsTest.php +++ b/tests/Feature/Locations/Api/IndexLocationsTest.php @@ -10,19 +10,19 @@ use Tests\TestCase; class IndexLocationsTest extends TestCase { - public function testViewingLocationIndexRequiresAuthentication() + public function testViewingLocationIndexRequiresAuthentication(): void { $this->getJson(route('api.locations.index'))->assertRedirect(); } - public function testViewingLocationIndexRequiresPermission() + public function testViewingLocationIndexRequiresPermission(): void { $this->actingAsForApi(User::factory()->create()) ->getJson(route('api.locations.index')) ->assertForbidden(); } - public function testLocationIndexReturnsExpectedLocations() + public function testLocationIndexReturnsExpectedLocations(): void { Location::factory()->count(3)->create(); diff --git a/tests/Feature/Locations/Api/LocationsForSelectListTest.php b/tests/Feature/Locations/Api/LocationsForSelectListTest.php index f34b97892f..d9e0c7a880 100644 --- a/tests/Feature/Locations/Api/LocationsForSelectListTest.php +++ b/tests/Feature/Locations/Api/LocationsForSelectListTest.php @@ -9,14 +9,14 @@ use Tests\TestCase; class LocationsForSelectListTest extends TestCase { - public function testGettingLocationListRequiresProperPermission() + public function testGettingLocationListRequiresProperPermission(): void { $this->actingAsForApi(User::factory()->create()) ->getJson(route('api.locations.selectlist')) ->assertForbidden(); } - public function testLocationsReturned() + public function testLocationsReturned(): void { Location::factory()->create(); @@ -35,7 +35,7 @@ class LocationsForSelectListTest extends TestCase ->assertJson(fn(AssertableJson $json) => $json->has('results', 1)->etc()); } - public function testLocationsAreReturnedWhenUserIsUpdatingTheirProfileAndHasPermissionToUpdateLocation() + public function testLocationsAreReturnedWhenUserIsUpdatingTheirProfileAndHasPermissionToUpdateLocation(): void { $this->actingAsForApi(User::factory()->canEditOwnLocation()->create()) ->withHeader('referer', route('profile')) diff --git a/tests/Feature/Locations/Api/LocationsViewTest.php b/tests/Feature/Locations/Api/LocationsViewTest.php index 1d57e58263..15a320ed8d 100644 --- a/tests/Feature/Locations/Api/LocationsViewTest.php +++ b/tests/Feature/Locations/Api/LocationsViewTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class LocationsViewTest extends TestCase { - public function testViewingLocationRequiresPermission() + public function testViewingLocationRequiresPermission(): void { $location = Location::factory()->create(); $this->actingAsForApi(User::factory()->create()) @@ -17,7 +17,7 @@ class LocationsViewTest extends TestCase ->assertForbidden(); } - public function testViewingLocationAssetIndexRequiresPermission() + public function testViewingLocationAssetIndexRequiresPermission(): void { $location = Location::factory()->create(); $this->actingAsForApi(User::factory()->create()) @@ -25,7 +25,7 @@ class LocationsViewTest extends TestCase ->assertForbidden(); } - public function testViewingLocationAssetIndex() + public function testViewingLocationAssetIndex(): void { $location = Location::factory()->create(); Asset::factory()->count(3)->assignedToLocation($location)->create(); diff --git a/tests/Feature/Locations/Api/UpdateLocationsTest.php b/tests/Feature/Locations/Api/UpdateLocationsTest.php index a3dd8c228c..ce9bd570c1 100644 --- a/tests/Feature/Locations/Api/UpdateLocationsTest.php +++ b/tests/Feature/Locations/Api/UpdateLocationsTest.php @@ -9,14 +9,14 @@ use Tests\TestCase; class UpdateLocationsTest extends TestCase { - public function testRequiresPermissionToEditLocation() + public function testRequiresPermissionToEditLocation(): void { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.locations.store', Location::factory()->create())) ->assertForbidden(); } - public function testCanUpdateLocationViaPatch() + public function testCanUpdateLocationViaPatch(): void { $location = Location::factory()->create(); diff --git a/tests/Feature/Locations/Ui/CreateLocationsTest.php b/tests/Feature/Locations/Ui/CreateLocationsTest.php index 5e229f1043..4eb3a0d759 100644 --- a/tests/Feature/Locations/Ui/CreateLocationsTest.php +++ b/tests/Feature/Locations/Ui/CreateLocationsTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class CreateLocationsTest extends TestCase { - public function testPermissionRequiredToCreateLocation() + public function testPermissionRequiredToCreateLocation(): void { $this->actingAs(User::factory()->create()) ->post(route('locations.store'), [ @@ -19,7 +19,7 @@ class CreateLocationsTest extends TestCase ->assertForbidden(); } - public function testUserCanCreateLocations() + public function testUserCanCreateLocations(): void { $this->assertFalse(Location::where('name', 'Test Location')->exists()); diff --git a/tests/Feature/Locations/Ui/IndexLocationsTest.php b/tests/Feature/Locations/Ui/IndexLocationsTest.php index 43f117cb64..28aaeec6f7 100644 --- a/tests/Feature/Locations/Ui/IndexLocationsTest.php +++ b/tests/Feature/Locations/Ui/IndexLocationsTest.php @@ -7,14 +7,14 @@ use Tests\TestCase; class IndexLocationsTest extends TestCase { - public function testPermissionRequiredToViewLocationsList() + public function testPermissionRequiredToViewLocationsList(): void { $this->actingAs(User::factory()->create()) ->get(route('locations.index')) ->assertForbidden(); } - public function testUserCanListLocations() + public function testUserCanListLocations(): void { $this->actingAs(User::factory()->superuser()->create()) ->get(route('locations.index')) diff --git a/tests/Feature/Locations/Ui/UpdateLocationsTest.php b/tests/Feature/Locations/Ui/UpdateLocationsTest.php index 5359cd1b71..02fbb4813a 100644 --- a/tests/Feature/Locations/Ui/UpdateLocationsTest.php +++ b/tests/Feature/Locations/Ui/UpdateLocationsTest.php @@ -8,7 +8,7 @@ use Tests\TestCase; class UpdateLocationsTest extends TestCase { - public function testPermissionRequiredToStoreLocation() + public function testPermissionRequiredToStoreLocation(): void { $this->actingAs(User::factory()->create()) ->post(route('locations.store'), [ @@ -19,7 +19,7 @@ class UpdateLocationsTest extends TestCase } - public function testUserCanEditLocations() + public function testUserCanEditLocations(): void { $location = Location::factory()->create(['name' => 'Test Location']); $this->assertTrue(Location::where('name', 'Test Location')->exists()); @@ -36,7 +36,7 @@ class UpdateLocationsTest extends TestCase $this->assertTrue(Location::where('name', 'Test Location Edited')->exists()); } - public function testUserCannotEditLocationsToMakeThemTheirOwnParent() + public function testUserCannotEditLocationsToMakeThemTheirOwnParent(): void { $location = Location::factory()->create(); diff --git a/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php b/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php index 449f65c7ab..219cb528f8 100644 --- a/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php +++ b/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php @@ -20,7 +20,7 @@ class EmailNotificationsUponCheckinTest extends TestCase Notification::fake(); } - public function testCheckInEmailSentToUserIfSettingEnabled() + public function testCheckInEmailSentToUserIfSettingEnabled(): void { $user = User::factory()->create(); $asset = Asset::factory()->assignedToUser($user)->create(); @@ -37,7 +37,7 @@ class EmailNotificationsUponCheckinTest extends TestCase ); } - public function testCheckInEmailNotSentToUserIfSettingDisabled() + public function testCheckInEmailNotSentToUserIfSettingDisabled(): void { $user = User::factory()->create(); $asset = Asset::factory()->assignedToUser($user)->create(); diff --git a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php index adaede07ec..b6f6964ab1 100644 --- a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php +++ b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php @@ -45,7 +45,7 @@ class SlackNotificationsUponCheckinTest extends TestCase ]; } - public function testAccessoryCheckinSendsSlackNotificationWhenSettingEnabled() + public function testAccessoryCheckinSendsSlackNotificationWhenSettingEnabled(): void { $this->settings->enableSlackWebhook(); @@ -57,7 +57,7 @@ class SlackNotificationsUponCheckinTest extends TestCase $this->assertSlackNotificationSent(CheckinAccessoryNotification::class); } - public function testAccessoryCheckinDoesNotSendSlackNotificationWhenSettingDisabled() + public function testAccessoryCheckinDoesNotSendSlackNotificationWhenSettingDisabled(): void { $this->settings->disableSlackWebhook(); @@ -70,7 +70,7 @@ class SlackNotificationsUponCheckinTest extends TestCase } #[DataProvider('assetCheckInTargets')] - public function testAssetCheckinSendsSlackNotificationWhenSettingEnabled($checkoutTarget) + public function testAssetCheckinSendsSlackNotificationWhenSettingEnabled($checkoutTarget): void { $this->settings->enableSlackWebhook(); @@ -83,7 +83,7 @@ class SlackNotificationsUponCheckinTest extends TestCase } #[DataProvider('assetCheckInTargets')] - public function testAssetCheckinDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget) + public function testAssetCheckinDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget): void { $this->settings->disableSlackWebhook(); @@ -95,7 +95,7 @@ class SlackNotificationsUponCheckinTest extends TestCase $this->assertNoSlackNotificationSent(CheckinAssetNotification::class); } - public function testComponentCheckinDoesNotSendSlackNotification() + public function testComponentCheckinDoesNotSendSlackNotification(): void { $this->settings->enableSlackWebhook(); @@ -108,7 +108,7 @@ class SlackNotificationsUponCheckinTest extends TestCase } #[DataProvider('licenseCheckInTargets')] - public function testLicenseCheckinSendsSlackNotificationWhenSettingEnabled($checkoutTarget) + public function testLicenseCheckinSendsSlackNotificationWhenSettingEnabled($checkoutTarget): void { $this->settings->enableSlackWebhook(); @@ -121,7 +121,7 @@ class SlackNotificationsUponCheckinTest extends TestCase } #[DataProvider('licenseCheckInTargets')] - public function testLicenseCheckinDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget) + public function testLicenseCheckinDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget): void { $this->settings->disableSlackWebhook(); diff --git a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php index 4f34da2857..39af3f6c54 100644 --- a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php +++ b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php @@ -47,7 +47,7 @@ class SlackNotificationsUponCheckoutTest extends TestCase ]; } - public function testAccessoryCheckoutSendsSlackNotificationWhenSettingEnabled() + public function testAccessoryCheckoutSendsSlackNotificationWhenSettingEnabled(): void { $this->settings->enableSlackWebhook(); @@ -59,7 +59,7 @@ class SlackNotificationsUponCheckoutTest extends TestCase $this->assertSlackNotificationSent(CheckoutAccessoryNotification::class); } - public function testAccessoryCheckoutDoesNotSendSlackNotificationWhenSettingDisabled() + public function testAccessoryCheckoutDoesNotSendSlackNotificationWhenSettingDisabled(): void { $this->settings->disableSlackWebhook(); @@ -72,7 +72,7 @@ class SlackNotificationsUponCheckoutTest extends TestCase } #[DataProvider('assetCheckoutTargets')] - public function testAssetCheckoutSendsSlackNotificationWhenSettingEnabled($checkoutTarget) + public function testAssetCheckoutSendsSlackNotificationWhenSettingEnabled($checkoutTarget): void { $this->settings->enableSlackWebhook(); @@ -85,7 +85,7 @@ class SlackNotificationsUponCheckoutTest extends TestCase } #[DataProvider('assetCheckoutTargets')] - public function testAssetCheckoutDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget) + public function testAssetCheckoutDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget): void { $this->settings->disableSlackWebhook(); @@ -97,7 +97,7 @@ class SlackNotificationsUponCheckoutTest extends TestCase $this->assertNoSlackNotificationSent(CheckoutAssetNotification::class); } - public function testComponentCheckoutDoesNotSendSlackNotification() + public function testComponentCheckoutDoesNotSendSlackNotification(): void { $this->settings->enableSlackWebhook(); @@ -109,7 +109,7 @@ class SlackNotificationsUponCheckoutTest extends TestCase Notification::assertNothingSent(); } - public function testConsumableCheckoutSendsSlackNotificationWhenSettingEnabled() + public function testConsumableCheckoutSendsSlackNotificationWhenSettingEnabled(): void { $this->settings->enableSlackWebhook(); @@ -121,7 +121,7 @@ class SlackNotificationsUponCheckoutTest extends TestCase $this->assertSlackNotificationSent(CheckoutConsumableNotification::class); } - public function testConsumableCheckoutDoesNotSendSlackNotificationWhenSettingDisabled() + public function testConsumableCheckoutDoesNotSendSlackNotificationWhenSettingDisabled(): void { $this->settings->disableSlackWebhook(); @@ -134,7 +134,7 @@ class SlackNotificationsUponCheckoutTest extends TestCase } #[DataProvider('licenseCheckoutTargets')] - public function testLicenseCheckoutSendsSlackNotificationWhenSettingEnabled($checkoutTarget) + public function testLicenseCheckoutSendsSlackNotificationWhenSettingEnabled($checkoutTarget): void { $this->settings->enableSlackWebhook(); @@ -147,7 +147,7 @@ class SlackNotificationsUponCheckoutTest extends TestCase } #[DataProvider('licenseCheckoutTargets')] - public function testLicenseCheckoutDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget) + public function testLicenseCheckoutDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget): void { $this->settings->disableSlackWebhook(); diff --git a/tests/Feature/Reporting/CustomReportTest.php b/tests/Feature/Reporting/CustomReportTest.php index 4d11cb23c8..015675016b 100644 --- a/tests/Feature/Reporting/CustomReportTest.php +++ b/tests/Feature/Reporting/CustomReportTest.php @@ -43,7 +43,7 @@ class CustomReportTest extends TestCase ); } - public function testCustomAssetReport() + public function testCustomAssetReport(): void { Asset::factory()->create(['name' => 'Asset A']); Asset::factory()->create(['name' => 'Asset B']); @@ -59,7 +59,7 @@ class CustomReportTest extends TestCase ->assertSeeTextInStreamedResponse('Asset B'); } - public function testCustomAssetReportAdheresToCompanyScoping() + public function testCustomAssetReportAdheresToCompanyScoping(): void { [$companyA, $companyB] = Company::factory()->count(2)->create(); @@ -105,7 +105,7 @@ class CustomReportTest extends TestCase ->assertSeeTextInStreamedResponse('Asset B'); } - public function testCanLimitAssetsByLastCheckIn() + public function testCanLimitAssetsByLastCheckIn(): void { Asset::factory()->create(['name' => 'Asset A', 'last_checkin' => '2023-08-01']); Asset::factory()->create(['name' => 'Asset B', 'last_checkin' => '2023-08-02']); diff --git a/tests/Feature/Reporting/UnacceptedAssetReportTest.php b/tests/Feature/Reporting/UnacceptedAssetReportTest.php index b3ec0b2e0b..8325661e23 100644 --- a/tests/Feature/Reporting/UnacceptedAssetReportTest.php +++ b/tests/Feature/Reporting/UnacceptedAssetReportTest.php @@ -44,14 +44,14 @@ class UnacceptedAssetReportTest extends TestCase } - public function testPermissionRequiredToViewUnacceptedAssetReport() + public function testPermissionRequiredToViewUnacceptedAssetReport(): void { $this->actingAs(User::factory()->create()) ->get(route('reports/unaccepted_assets')) ->assertForbidden(); } - public function testUserCanListUnacceptedAssets() + public function testUserCanListUnacceptedAssets(): void { $this->actingAs(User::factory()->superuser()->create()) ->get(route('reports/unaccepted_assets')) diff --git a/tests/Feature/Settings/BrandingSettingsTest.php b/tests/Feature/Settings/BrandingSettingsTest.php index 03e2b013f6..cb8665f1cb 100644 --- a/tests/Feature/Settings/BrandingSettingsTest.php +++ b/tests/Feature/Settings/BrandingSettingsTest.php @@ -12,7 +12,7 @@ use App\Models\Setting; class BrandingSettingsTest extends TestCase { - public function testSiteNameIsRequired() + public function testSiteNameIsRequired(): void { $response = $this->actingAs(User::factory()->superuser()->create()) ->from(route('settings.branding.index')) @@ -25,7 +25,7 @@ class BrandingSettingsTest extends TestCase $this->followRedirects($response)->assertSee(trans('general.error')); } - public function testSiteNameCanBeSaved() + public function testSiteNameCanBeSaved(): void { $response = $this->actingAs(User::factory()->superuser()->create()) ->post(route('settings.branding.save', ['site_name' => 'My Awesome Site'])) @@ -38,7 +38,7 @@ class BrandingSettingsTest extends TestCase } - public function testLogoCanBeUploaded() + public function testLogoCanBeUploaded(): void { Storage::fake('public'); $setting = Setting::factory()->create(['logo' => null]); @@ -58,7 +58,7 @@ class BrandingSettingsTest extends TestCase Storage::disk('public')->assertExists($setting->logo); } - public function testLogoCanBeDeleted() + public function testLogoCanBeDeleted(): void { Storage::fake('public'); @@ -82,7 +82,7 @@ class BrandingSettingsTest extends TestCase //Storage::disk('public')->assertMissing($original_file); } - public function testEmailLogoCanBeUploaded() + public function testEmailLogoCanBeUploaded(): void { Storage::fake('public'); @@ -108,7 +108,7 @@ class BrandingSettingsTest extends TestCase // Storage::disk('public')->assertMissing($original_file); } - public function testEmailLogoCanBeDeleted() + public function testEmailLogoCanBeDeleted(): void { Storage::fake('public'); @@ -135,7 +135,7 @@ class BrandingSettingsTest extends TestCase } - public function testLabelLogoCanBeUploaded() + public function testLabelLogoCanBeUploaded(): void { Storage::fake('public'); @@ -164,7 +164,7 @@ class BrandingSettingsTest extends TestCase } - public function testLabelLogoCanBeDeleted() + public function testLabelLogoCanBeDeleted(): void { Storage::fake('public'); @@ -191,7 +191,7 @@ class BrandingSettingsTest extends TestCase } - public function testDefaultAvatarCanBeUploaded() + public function testDefaultAvatarCanBeUploaded(): void { Storage::fake('public'); @@ -213,7 +213,7 @@ class BrandingSettingsTest extends TestCase // Storage::disk('public')->assertMissing($original_file); } - public function testDefaultAvatarCanBeDeleted() + public function testDefaultAvatarCanBeDeleted(): void { Storage::fake('public'); @@ -238,7 +238,7 @@ class BrandingSettingsTest extends TestCase // Storage::disk('public')->assertMissing($original_file); } - public function testSnipeDefaultAvatarCanBeDeleted() + public function testSnipeDefaultAvatarCanBeDeleted(): void { $setting = Setting::getSettings()->first(); @@ -263,7 +263,7 @@ class BrandingSettingsTest extends TestCase } - public function testFaviconCanBeUploaded() + public function testFaviconCanBeUploaded(): void { $this->markTestIncomplete('This fails mimetype validation on the mock'); Storage::fake('public'); @@ -284,7 +284,7 @@ class BrandingSettingsTest extends TestCase Storage::disk('public')->assertExists('favicon.png'); } - public function testFaviconCanBeDeleted() + public function testFaviconCanBeDeleted(): void { $this->markTestIncomplete('This fails mimetype validation on the mock'); Storage::fake('public'); diff --git a/tests/Feature/Settings/ShowSetUpPageTest.php b/tests/Feature/Settings/ShowSetUpPageTest.php index 196902ac5f..9fea64dd64 100644 --- a/tests/Feature/Settings/ShowSetUpPageTest.php +++ b/tests/Feature/Settings/ShowSetUpPageTest.php @@ -302,7 +302,7 @@ class ShowSetUpPageTest extends TestCase $this->assertSeeDirectoryPermissionError(false); } - public function testInvalidTLSCertsOkWhenCheckingForEnvFile() + public function testInvalidTLSCertsOkWhenCheckingForEnvFile(): void { //set the weird bad SSL cert place - https://self-signed.badssl.com $this->markTestIncomplete("Not yet sure how to write this test, it requires messing with .env ..."); diff --git a/tests/Feature/Users/Api/DeleteUserTest.php b/tests/Feature/Users/Api/DeleteUserTest.php index 49625daac3..2fab34d059 100644 --- a/tests/Feature/Users/Api/DeleteUserTest.php +++ b/tests/Feature/Users/Api/DeleteUserTest.php @@ -12,7 +12,7 @@ class DeleteUserTest extends TestCase { - public function testErrorReturnedViaApiIfUserDoesNotExist() + public function testErrorReturnedViaApiIfUserDoesNotExist(): void { $this->actingAsForApi(User::factory()->deleteUsers()->create()) ->deleteJson(route('api.users.destroy', 'invalid-id')) @@ -22,7 +22,7 @@ class DeleteUserTest extends TestCase ->json(); } - public function testErrorReturnedViaApiIfUserIsAlreadyDeleted() + public function testErrorReturnedViaApiIfUserIsAlreadyDeleted(): void { $user = User::factory()->deletedUser()->create(); $this->actingAsForApi(User::factory()->deleteUsers()->create()) @@ -34,7 +34,7 @@ class DeleteUserTest extends TestCase } - public function testDisallowUserDeletionViaApiIfStillManagingPeople() + public function testDisallowUserDeletionViaApiIfStillManagingPeople(): void { $manager = User::factory()->create(); User::factory()->count(5)->create(['manager_id' => $manager->id]); @@ -48,7 +48,7 @@ class DeleteUserTest extends TestCase ->json(); } - public function testDisallowUserDeletionViaApiIfStillManagingLocations() + public function testDisallowUserDeletionViaApiIfStillManagingLocations(): void { $manager = User::factory()->create(); Location::factory()->count(5)->create(['manager_id' => $manager->id]); @@ -63,7 +63,7 @@ class DeleteUserTest extends TestCase ->json(); } - public function testDisallowUserDeletionViaApiIfStillHasLicenses() + public function testDisallowUserDeletionViaApiIfStillHasLicenses(): void { $manager = User::factory()->create(); LicenseSeat::factory()->count(5)->create(['assigned_to' => $manager->id]); @@ -78,7 +78,7 @@ class DeleteUserTest extends TestCase ->json(); } - public function testDeniedPermissionsForDeletingUserViaApi() + public function testDeniedPermissionsForDeletingUserViaApi(): void { $this->actingAsForApi(User::factory()->create()) ->deleteJson(route('api.users.destroy', User::factory()->create())) @@ -86,7 +86,7 @@ class DeleteUserTest extends TestCase ->json(); } - public function testSuccessPermissionsForDeletingUserViaApi() + public function testSuccessPermissionsForDeletingUserViaApi(): void { $this->actingAsForApi(User::factory()->deleteUsers()->create()) ->deleteJson(route('api.users.destroy', User::factory()->create())) @@ -97,7 +97,7 @@ class DeleteUserTest extends TestCase } - public function testPermissionsForDeletingIfNotInSameCompanyAndNotSuperadmin() + public function testPermissionsForDeletingIfNotInSameCompanyAndNotSuperadmin(): void { $this->settings->enableMultipleFullCompanySupport(); @@ -139,7 +139,7 @@ class DeleteUserTest extends TestCase } - public function testUsersCannotDeleteThemselves() + public function testUsersCannotDeleteThemselves(): void { $user = User::factory()->deleteUsers()->create(); $this->actingAsForApi($user) diff --git a/tests/Feature/Users/Api/RestoreUserTest.php b/tests/Feature/Users/Api/RestoreUserTest.php index 0ffac8f07e..9ec087a87a 100644 --- a/tests/Feature/Users/Api/RestoreUserTest.php +++ b/tests/Feature/Users/Api/RestoreUserTest.php @@ -12,7 +12,7 @@ class RestoreUserTest extends TestCase { - public function testErrorReturnedViaApiIfUserDoesNotExist() + public function testErrorReturnedViaApiIfUserDoesNotExist(): void { $this->actingAsForApi(User::factory()->deleteUsers()->create()) ->postJson(route('api.users.restore', 'invalid-id')) @@ -22,7 +22,7 @@ class RestoreUserTest extends TestCase ->json(); } - public function testErrorReturnedViaApiIfUserIsNotDeleted() + public function testErrorReturnedViaApiIfUserIsNotDeleted(): void { $user = User::factory()->create(); $this->actingAsForApi(User::factory()->deleteUsers()->create()) @@ -34,7 +34,7 @@ class RestoreUserTest extends TestCase } - public function testDeniedPermissionsForRestoringUserViaApi() + public function testDeniedPermissionsForRestoringUserViaApi(): void { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.users.restore', User::factory()->deletedUser()->create())) @@ -42,7 +42,7 @@ class RestoreUserTest extends TestCase ->json(); } - public function testSuccessPermissionsForRestoringUserViaApi() + public function testSuccessPermissionsForRestoringUserViaApi(): void { $deleted_user = User::factory()->deletedUser()->create(); @@ -57,7 +57,7 @@ class RestoreUserTest extends TestCase $this->assertNull($deleted_user->deleted_at); } - public function testPermissionsForRestoringIfNotInSameCompanyAndNotSuperadmin() + public function testPermissionsForRestoringIfNotInSameCompanyAndNotSuperadmin(): void { $this->settings->enableMultipleFullCompanySupport(); diff --git a/tests/Feature/Users/Api/UpdateUserTest.php b/tests/Feature/Users/Api/UpdateUserTest.php index 1c66bbdda9..4f64998a66 100644 --- a/tests/Feature/Users/Api/UpdateUserTest.php +++ b/tests/Feature/Users/Api/UpdateUserTest.php @@ -12,7 +12,7 @@ use Tests\TestCase; class UpdateUserTest extends TestCase { - public function testCanUpdateUserViaPatch() + public function testCanUpdateUserViaPatch(): void { $admin = User::factory()->superuser()->create(); $manager = User::factory()->create(); @@ -82,7 +82,7 @@ class UpdateUserTest extends TestCase $this->assertTrue($user->groups->contains($groupB), 'Not part of expected group'); } - public function testApiUsersCanBeActivatedWithNumber() + public function testApiUsersCanBeActivatedWithNumber(): void { $admin = User::factory()->superuser()->create(); $user = User::factory()->create(['activated' => 0]); @@ -95,7 +95,7 @@ class UpdateUserTest extends TestCase $this->assertEquals(1, $user->refresh()->activated); } - public function testApiUsersCanBeActivatedWithBooleanTrue() + public function testApiUsersCanBeActivatedWithBooleanTrue(): void { $admin = User::factory()->superuser()->create(); $user = User::factory()->create(['activated' => false]); @@ -108,7 +108,7 @@ class UpdateUserTest extends TestCase $this->assertEquals(1, $user->refresh()->activated); } - public function testApiUsersCanBeDeactivatedWithNumber() + public function testApiUsersCanBeDeactivatedWithNumber(): void { $admin = User::factory()->superuser()->create(); $user = User::factory()->create(['activated' => true]); @@ -121,7 +121,7 @@ class UpdateUserTest extends TestCase $this->assertEquals(0, $user->refresh()->activated); } - public function testApiUsersCanBeDeactivatedWithBooleanFalse() + public function testApiUsersCanBeDeactivatedWithBooleanFalse(): void { $admin = User::factory()->superuser()->create(); $user = User::factory()->create(['activated' => true]); @@ -134,7 +134,7 @@ class UpdateUserTest extends TestCase $this->assertEquals(0, $user->refresh()->activated); } - public function testUsersScopedToCompanyDuringUpdateWhenMultipleFullCompanySupportEnabled() + public function testUsersScopedToCompanyDuringUpdateWhenMultipleFullCompanySupportEnabled(): void { $this->settings->enableMultipleFullCompanySupport(); @@ -223,7 +223,7 @@ class UpdateUserTest extends TestCase ->json(); } - public function testUserGroupsAreOnlyUpdatedIfAuthenticatedUserIsSuperUser() + public function testUserGroupsAreOnlyUpdatedIfAuthenticatedUserIsSuperUser(): void { $groupToJoin = Group::factory()->create(); @@ -250,7 +250,7 @@ class UpdateUserTest extends TestCase $this->assertTrue($userToUpdateByToUserBySuperuser->refresh()->groups->contains($groupToJoin)); } - public function testUserGroupsCanBeClearedBySuperUser() + public function testUserGroupsCanBeClearedBySuperUser(): void { $normalUser = User::factory()->editUsers()->create(); $superUser = User::factory()->superuser()->create(); @@ -276,7 +276,7 @@ class UpdateUserTest extends TestCase $this->assertFalse($anotherUserToUpdate->refresh()->groups->contains($joinedGroup)); } - public function testNonSuperuserCannotUpdateOwnGroups() + public function testNonSuperuserCannotUpdateOwnGroups(): void { $groupToJoin = Group::factory()->create(); $user = User::factory()->editUsers()->create(); @@ -292,7 +292,7 @@ class UpdateUserTest extends TestCase } - public function testNonSuperuserCannotUpdateGroups() + public function testNonSuperuserCannotUpdateGroups(): void { $user = User::factory()->editUsers()->create(); $group = Group::factory()->create(); @@ -313,7 +313,7 @@ class UpdateUserTest extends TestCase } - public function testUsersGroupsAreNotClearedIfNoGroupPassedBySuperUser() + public function testUsersGroupsAreNotClearedIfNoGroupPassedBySuperUser(): void { $user = User::factory()->create(); $superUser = User::factory()->superuser()->create(); @@ -327,7 +327,7 @@ class UpdateUserTest extends TestCase $this->assertTrue($user->refresh()->groups->contains($group)); } - public function testMultipleGroupsUpdateBySuperUser() + public function testMultipleGroupsUpdateBySuperUser(): void { $user = User::factory()->create(); $superUser = User::factory()->superuser()->create(); diff --git a/tests/Feature/Users/Api/UserSearchTest.php b/tests/Feature/Users/Api/UserSearchTest.php index dc0ffdc803..351fd12678 100644 --- a/tests/Feature/Users/Api/UserSearchTest.php +++ b/tests/Feature/Users/Api/UserSearchTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class UserSearchTest extends TestCase { - public function testCanSearchByUserFirstAndLastName() + public function testCanSearchByUserFirstAndLastName(): void { User::factory()->create(['first_name' => 'Luke', 'last_name' => 'Skywalker']); User::factory()->create(['first_name' => 'Darth', 'last_name' => 'Vader']); @@ -24,7 +24,7 @@ class UserSearchTest extends TestCase $this->assertFalse($results->pluck('name')->contains(fn($text) => str_contains($text, 'Darth'))); } - public function testResultsWhenSearchingForActiveUsers() + public function testResultsWhenSearchingForActiveUsers(): void { User::factory()->create(['first_name' => 'Active', 'last_name' => 'User']); User::factory()->create(['first_name' => 'Deleted', 'last_name' => 'User'])->delete(); @@ -53,7 +53,7 @@ class UserSearchTest extends TestCase ); } - public function testResultsWhenSearchingForDeletedUsers() + public function testResultsWhenSearchingForDeletedUsers(): void { User::factory()->create(['first_name' => 'Active', 'last_name' => 'User']); User::factory()->create(['first_name' => 'Deleted', 'last_name' => 'User'])->delete(); @@ -82,7 +82,7 @@ class UserSearchTest extends TestCase ); } - public function testUsersScopedToCompanyWhenMultipleFullCompanySupportEnabled() + public function testUsersScopedToCompanyWhenMultipleFullCompanySupportEnabled(): void { $this->settings->enableMultipleFullCompanySupport(); @@ -110,7 +110,7 @@ class UserSearchTest extends TestCase ); } - public function testUsersScopedToCompanyDuringSearchWhenMultipleFullCompanySupportEnabled() + public function testUsersScopedToCompanyDuringSearchWhenMultipleFullCompanySupportEnabled(): void { $this->settings->enableMultipleFullCompanySupport(); @@ -145,7 +145,7 @@ class UserSearchTest extends TestCase ); } - public function testUsersIndexWhenInvalidSortFieldIsPassed() + public function testUsersIndexWhenInvalidSortFieldIsPassed(): void { $this->markIncompleteIfSqlite('This test is not compatible with SQLite'); diff --git a/tests/Feature/Users/Api/UsersForSelectListTest.php b/tests/Feature/Users/Api/UsersForSelectListTest.php index 1367f408d4..c79650f60a 100644 --- a/tests/Feature/Users/Api/UsersForSelectListTest.php +++ b/tests/Feature/Users/Api/UsersForSelectListTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; class UsersForSelectListTest extends TestCase { - public function testUsersAreReturned() + public function testUsersAreReturned(): void { $users = User::factory()->superuser()->count(3)->create(); @@ -27,7 +27,7 @@ class UsersForSelectListTest extends TestCase ->assertJson(fn(AssertableJson $json) => $json->has('results', 3)->etc()); } - public function testUsersCanBeSearchedByFirstAndLastName() + public function testUsersCanBeSearchedByFirstAndLastName(): void { User::factory()->create(['first_name' => 'Luke', 'last_name' => 'Skywalker']); @@ -40,7 +40,7 @@ class UsersForSelectListTest extends TestCase $this->assertTrue($results->pluck('text')->contains(fn($text) => str_contains($text, 'Luke'))); } - public function testUsersScopedToCompanyWhenMultipleFullCompanySupportEnabled() + public function testUsersScopedToCompanyWhenMultipleFullCompanySupportEnabled(): void { $this->settings->enableMultipleFullCompanySupport(); @@ -68,7 +68,7 @@ class UsersForSelectListTest extends TestCase ); } - public function testUsersScopedToCompanyDuringSearchWhenMultipleFullCompanySupportEnabled() + public function testUsersScopedToCompanyDuringSearchWhenMultipleFullCompanySupportEnabled(): void { $this->settings->enableMultipleFullCompanySupport(); diff --git a/tests/Feature/Users/Api/ViewUserTest.php b/tests/Feature/Users/Api/ViewUserTest.php index 07346dbbb8..e0ce78c11c 100644 --- a/tests/Feature/Users/Api/ViewUserTest.php +++ b/tests/Feature/Users/Api/ViewUserTest.php @@ -11,7 +11,7 @@ use Tests\TestCase; class ViewUserTest extends TestCase { - public function testCanReturnUser() + public function testCanReturnUser(): void { $user = User::factory()->create(); diff --git a/tests/Feature/Users/Ui/DeleteUserTest.php b/tests/Feature/Users/Ui/DeleteUserTest.php index da4c5a37ee..e0defe742b 100644 --- a/tests/Feature/Users/Ui/DeleteUserTest.php +++ b/tests/Feature/Users/Ui/DeleteUserTest.php @@ -14,7 +14,7 @@ use App\Models\Asset; class DeleteUserTest extends TestCase { - public function testUserCanDeleteAnotherUser() + public function testUserCanDeleteAnotherUser(): void { $user = User::factory()->deleteUsers()->viewUsers()->create(); $this->actingAs(User::factory()->deleteUsers()->viewUsers()->create())->assertTrue($user->isDeletable()); @@ -28,7 +28,7 @@ class DeleteUserTest extends TestCase } - public function testErrorReturnedIfUserDoesNotExist() + public function testErrorReturnedIfUserDoesNotExist(): void { $response = $this->actingAs(User::factory()->deleteUsers()->viewUsers()->create()) ->delete(route('users.destroy', ['user' => '40596803548609346'])) @@ -37,7 +37,7 @@ class DeleteUserTest extends TestCase $this->followRedirects($response)->assertSee(trans('alert-danger')); } - public function testErrorReturnedIfUserIsAlreadyDeleted() + public function testErrorReturnedIfUserIsAlreadyDeleted(): void { $user = User::factory()->deletedUser()->viewUsers()->create(); $response = $this->actingAs(User::factory()->deleteUsers()->viewUsers()->create()) @@ -49,7 +49,7 @@ class DeleteUserTest extends TestCase } - public function testFmcsPermissionsToDeleteUser() + public function testFmcsPermissionsToDeleteUser(): void { $this->settings->enableMultipleFullCompanySupport(); @@ -90,7 +90,7 @@ class DeleteUserTest extends TestCase } - public function testDisallowUserDeletionIfStillManagingPeople() + public function testDisallowUserDeletionIfStillManagingPeople(): void { $manager = User::factory()->create(); User::factory()->count(1)->create(['manager_id' => $manager->id]); @@ -105,7 +105,7 @@ class DeleteUserTest extends TestCase $this->followRedirects($response)->assertSee('Error'); } - public function testDisallowUserDeletionIfStillManagingLocations() + public function testDisallowUserDeletionIfStillManagingLocations(): void { $manager = User::factory()->create(); Location::factory()->count(2)->create(['manager_id' => $manager->id]); @@ -120,7 +120,7 @@ class DeleteUserTest extends TestCase $this->followRedirects($response)->assertSee('Error'); } - public function testDisallowUserDeletionIfStillHaveAccessories() + public function testDisallowUserDeletionIfStillHaveAccessories(): void { $user = User::factory()->create(); Accessory::factory()->count(3)->checkedOutToUser($user)->create(); @@ -135,7 +135,7 @@ class DeleteUserTest extends TestCase $this->followRedirects($response)->assertSee('Error'); } - public function testDisallowUserDeletionIfStillHaveLicenses() + public function testDisallowUserDeletionIfStillHaveLicenses(): void { $user = User::factory()->create(); LicenseSeat::factory()->count(4)->create(['assigned_to' => $user->id]); @@ -151,7 +151,7 @@ class DeleteUserTest extends TestCase } - public function testAllowUserDeletionIfNotManagingLocations() + public function testAllowUserDeletionIfNotManagingLocations(): void { $manager = User::factory()->create(); $this->actingAs(User::factory()->deleteUsers()->viewUsers()->create())->assertTrue($manager->isDeletable()); @@ -165,14 +165,14 @@ class DeleteUserTest extends TestCase } - public function testDisallowUserDeletionIfNoDeletePermissions() + public function testDisallowUserDeletionIfNoDeletePermissions(): void { $manager = User::factory()->create(); Location::factory()->create(['manager_id' => $manager->id]); $this->actingAs(User::factory()->editUsers()->viewUsers()->create())->assertFalse($manager->isDeletable()); } - public function testDisallowUserDeletionIfTheyStillHaveAssets() + public function testDisallowUserDeletionIfTheyStillHaveAssets(): void { $user = User::factory()->create(); $asset = Asset::factory()->create(); @@ -195,7 +195,7 @@ class DeleteUserTest extends TestCase } - public function testUsersCannotDeleteThemselves() + public function testUsersCannotDeleteThemselves(): void { $manager = User::factory()->deleteUsers()->viewUsers()->create(); $this->actingAs(User::factory()->deleteUsers()->viewUsers()->create())->assertTrue($manager->isDeletable()); diff --git a/tests/Feature/Users/Ui/MergeUsersTest.php b/tests/Feature/Users/Ui/MergeUsersTest.php index a9ae11171b..c8bab343e5 100644 --- a/tests/Feature/Users/Ui/MergeUsersTest.php +++ b/tests/Feature/Users/Ui/MergeUsersTest.php @@ -13,7 +13,7 @@ use Tests\TestCase; class MergeUsersTest extends TestCase { - public function testAssetsAreTransferredOnUserMerge() + public function testAssetsAreTransferredOnUserMerge(): void { $user1 = User::factory()->create(); $user2 = User::factory()->create(); @@ -39,7 +39,7 @@ class MergeUsersTest extends TestCase } - public function testLicensesAreTransferredOnUserMerge() + public function testLicensesAreTransferredOnUserMerge(): void { $user1 = User::factory()->create(); $user2 = User::factory()->create(); @@ -67,7 +67,7 @@ class MergeUsersTest extends TestCase } - public function testAccessoriesTransferredOnUserMerge() + public function testAccessoriesTransferredOnUserMerge(): void { $user1 = User::factory()->create(); $user2 = User::factory()->create(); @@ -95,7 +95,7 @@ class MergeUsersTest extends TestCase } - public function testConsumablesTransferredOnUserMerge() + public function testConsumablesTransferredOnUserMerge(): void { $user1 = User::factory()->create(); $user2 = User::factory()->create(); @@ -123,7 +123,7 @@ class MergeUsersTest extends TestCase } - public function testFilesAreTransferredOnUserMerge() + public function testFilesAreTransferredOnUserMerge(): void { $user1 = User::factory()->create(); $user2 = User::factory()->create(); @@ -151,7 +151,7 @@ class MergeUsersTest extends TestCase } - public function testAcceptancesAreTransferredOnUserMerge() + public function testAcceptancesAreTransferredOnUserMerge(): void { $user1 = User::factory()->create(); $user2 = User::factory()->create(); @@ -179,7 +179,7 @@ class MergeUsersTest extends TestCase } - public function testUserUpdateHistoryIsTransferredOnUserMerge() + public function testUserUpdateHistoryIsTransferredOnUserMerge(): void { $user1 = User::factory()->create(); $user2 = User::factory()->create(); diff --git a/tests/Feature/Users/Ui/UpdateUserTest.php b/tests/Feature/Users/Ui/UpdateUserTest.php index bef1d59a06..16caa7e6a9 100644 --- a/tests/Feature/Users/Ui/UpdateUserTest.php +++ b/tests/Feature/Users/Ui/UpdateUserTest.php @@ -7,7 +7,7 @@ use Tests\TestCase; class UpdateUserTest extends TestCase { - public function testUsersCanBeActivatedWithNumber() + public function testUsersCanBeActivatedWithNumber(): void { $admin = User::factory()->superuser()->create(); $user = User::factory()->create(['activated' => 0]); @@ -22,7 +22,7 @@ class UpdateUserTest extends TestCase $this->assertEquals(1, $user->refresh()->activated); } - public function testUsersCanBeActivatedWithBooleanTrue() + public function testUsersCanBeActivatedWithBooleanTrue(): void { $admin = User::factory()->superuser()->create(); $user = User::factory()->create(['activated' => false]); @@ -37,7 +37,7 @@ class UpdateUserTest extends TestCase $this->assertEquals(1, $user->refresh()->activated); } - public function testUsersCanBeDeactivatedWithNumber() + public function testUsersCanBeDeactivatedWithNumber(): void { $admin = User::factory()->superuser()->create(); $user = User::factory()->create(['activated' => true]); @@ -52,7 +52,7 @@ class UpdateUserTest extends TestCase $this->assertEquals(0, $user->refresh()->activated); } - public function testUsersCanBeDeactivatedWithBooleanFalse() + public function testUsersCanBeDeactivatedWithBooleanFalse(): void { $admin = User::factory()->superuser()->create(); $user = User::factory()->create(['activated' => true]); @@ -67,7 +67,7 @@ class UpdateUserTest extends TestCase $this->assertEquals(0, $user->refresh()->activated); } - public function testUsersUpdatingThemselvesDoNotDeactivateTheirAccount() + public function testUsersUpdatingThemselvesDoNotDeactivateTheirAccount(): void { $admin = User::factory()->superuser()->create(['activated' => true]); diff --git a/tests/Feature/Users/Ui/ViewUserTest.php b/tests/Feature/Users/Ui/ViewUserTest.php index c412e9e789..5cd7051045 100644 --- a/tests/Feature/Users/Ui/ViewUserTest.php +++ b/tests/Feature/Users/Ui/ViewUserTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; class ViewUserTest extends TestCase { - public function testPermissionsForUserDetailPage() + public function testPermissionsForUserDetailPage(): void { $this->settings->enableMultipleFullCompanySupport(); @@ -29,7 +29,7 @@ class ViewUserTest extends TestCase ->assertStatus(200); } - public function testPermissionsForPrintAllInventoryPage() + public function testPermissionsForPrintAllInventoryPage(): void { $this->settings->enableMultipleFullCompanySupport(); @@ -52,7 +52,7 @@ class ViewUserTest extends TestCase ->assertStatus(200); } - public function testUserWithoutCompanyPermissionsCannotSendInventory() + public function testUserWithoutCompanyPermissionsCannotSendInventory(): void { Notification::fake(); diff --git a/tests/Unit/AccessoryTest.php b/tests/Unit/AccessoryTest.php index ec931fad6e..af05be10fa 100644 --- a/tests/Unit/AccessoryTest.php +++ b/tests/Unit/AccessoryTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; class AccessoryTest extends TestCase { - public function testAnAccessoryBelongsToACompany() + public function testAnAccessoryBelongsToACompany(): void { $accessory = Accessory::factory() ->create( @@ -20,7 +20,7 @@ class AccessoryTest extends TestCase $this->assertInstanceOf(Company::class, $accessory->company); } - public function testAnAccessoryHasALocation() + public function testAnAccessoryHasALocation(): void { $accessory = Accessory::factory() ->create( @@ -30,7 +30,7 @@ class AccessoryTest extends TestCase $this->assertInstanceOf(Location::class, $accessory->location); } - public function testAnAccessoryBelongsToACategory() + public function testAnAccessoryBelongsToACategory(): void { $accessory = Accessory::factory()->appleBtKeyboard() ->create( @@ -45,7 +45,7 @@ class AccessoryTest extends TestCase $this->assertEquals('accessory', $accessory->category->category_type); } - public function testAnAccessoryHasAManufacturer() + public function testAnAccessoryHasAManufacturer(): void { $accessory = Accessory::factory()->appleBtKeyboard()->create( [ diff --git a/tests/Unit/AssetMaintenanceTest.php b/tests/Unit/AssetMaintenanceTest.php index 46a0efdd7c..b317de9934 100644 --- a/tests/Unit/AssetMaintenanceTest.php +++ b/tests/Unit/AssetMaintenanceTest.php @@ -6,7 +6,7 @@ use Tests\TestCase; class AssetMaintenanceTest extends TestCase { - public function testZerosOutWarrantyIfBlank() + public function testZerosOutWarrantyIfBlank(): void { $c = new AssetMaintenance; $c->is_warranty = ''; @@ -15,7 +15,7 @@ class AssetMaintenanceTest extends TestCase $this->assertTrue($c->is_warranty == 4); } - public function testSetsCostsAppropriately() + public function testSetsCostsAppropriately(): void { $c = new AssetMaintenance(); $c->cost = '0.00'; @@ -26,7 +26,7 @@ class AssetMaintenanceTest extends TestCase $this->assertTrue($c->cost === 9.5); } - public function testNullsOutNotesIfBlank() + public function testNullsOutNotesIfBlank(): void { $c = new AssetMaintenance; $c->notes = ''; @@ -35,7 +35,7 @@ class AssetMaintenanceTest extends TestCase $this->assertTrue($c->notes === 'This is a long note'); } - public function testNullsOutCompletionDateIfBlankOrInvalid() + public function testNullsOutCompletionDateIfBlankOrInvalid(): void { $c = new AssetMaintenance; $c->completion_date = ''; diff --git a/tests/Unit/AssetModelTest.php b/tests/Unit/AssetModelTest.php index 4cc62e20a0..961560b5ab 100644 --- a/tests/Unit/AssetModelTest.php +++ b/tests/Unit/AssetModelTest.php @@ -8,7 +8,7 @@ use Tests\TestCase; class AssetModelTest extends TestCase { - public function testAnAssetModelContainsAssets() + public function testAnAssetModelContainsAssets(): void { $category = Category::factory()->create([ 'category_type' => 'asset' diff --git a/tests/Unit/AssetTest.php b/tests/Unit/AssetTest.php index ef0da1a1b8..619e34cc80 100644 --- a/tests/Unit/AssetTest.php +++ b/tests/Unit/AssetTest.php @@ -10,7 +10,7 @@ use App\Models\Setting; class AssetTest extends TestCase { - public function testAutoIncrement() + public function testAutoIncrement(): void { $this->settings->enableAutoIncrement(); @@ -22,7 +22,7 @@ class AssetTest extends TestCase } - public function testAutoIncrementCollision() + public function testAutoIncrementCollision(): void { $this->settings->enableAutoIncrement(); @@ -34,7 +34,7 @@ class AssetTest extends TestCase $this->assertFalse($b->save()); } - public function testAutoIncrementDouble() + public function testAutoIncrementDouble(): void { // make one asset with the autoincrement *ONE* higher than the next auto-increment // make sure you can then still make another @@ -53,7 +53,7 @@ class AssetTest extends TestCase $this->assertEquals($c->asset_tag, $final_number); } - public function testAutoIncrementGapAndBackfill() + public function testAutoIncrementGapAndBackfill(): void { // make one asset 3 higher than the next auto-increment // manually make one that's 1 lower than that @@ -82,7 +82,7 @@ class AssetTest extends TestCase $this->assertEquals($final->asset_tag, $final_result); } - public function testPrefixlessAutoincrementBackfill() + public function testPrefixlessAutoincrementBackfill(): void { // TODO: COPYPASTA FROM above, is there a way to still run this test but not have it be so duplicative? $this->settings->enableAutoIncrement()->set(['auto_increment_prefix' => '']); @@ -109,7 +109,7 @@ class AssetTest extends TestCase $this->assertEquals($final->asset_tag, $final_result); } - public function testUnzerofilledPrefixlessAutoincrementBackfill() + public function testUnzerofilledPrefixlessAutoincrementBackfill(): void { // TODO: COPYPASTA FROM above (AGAIN), is there a way to still run this test but not have it be so duplicative? $this->settings->enableAutoIncrement()->set(['auto_increment_prefix' => '','zerofill_count' => 0]); @@ -136,7 +136,7 @@ class AssetTest extends TestCase $this->assertEquals($final->asset_tag, $final_result); } - public function testAutoIncrementBIG() + public function testAutoIncrementBIG(): void { $this->settings->enableAutoIncrement(); @@ -153,7 +153,7 @@ class AssetTest extends TestCase $this->assertEquals(Setting::getSettings()->next_auto_tag_base, $matches[0] + 1, "Next auto increment number should be the last normally-saved one plus one, but isn't"); } - public function testAutoIncrementAlmostBIG() + public function testAutoIncrementAlmostBIG(): void { // TODO: this looks pretty close to the one above, could we maybe squish them together? $this->settings->enableAutoIncrement(); @@ -170,7 +170,7 @@ class AssetTest extends TestCase } - public function testWarrantyExpiresAttribute() + public function testWarrantyExpiresAttribute(): void { $asset = Asset::factory() diff --git a/tests/Unit/CategoryTest.php b/tests/Unit/CategoryTest.php index 391e291552..1a7bfd1ba5 100644 --- a/tests/Unit/CategoryTest.php +++ b/tests/Unit/CategoryTest.php @@ -8,7 +8,7 @@ use Tests\TestCase; class CategoryTest extends TestCase { - public function testFailsEmptyValidation() + public function testFailsEmptyValidation(): void { // An Asset requires a name, a qty, and a category_id. $a = Category::create(); @@ -24,7 +24,7 @@ class CategoryTest extends TestCase } } - public function testACategoryCanHaveAssets() + public function testACategoryCanHaveAssets(): void { $category = Category::factory()->assetDesktopCategory()->create(); diff --git a/tests/Unit/CompanyScopingTest.php b/tests/Unit/CompanyScopingTest.php index ff55e83056..084c223e6a 100644 --- a/tests/Unit/CompanyScopingTest.php +++ b/tests/Unit/CompanyScopingTest.php @@ -29,7 +29,7 @@ class CompanyScopingTest extends TestCase } #[DataProvider('models')] - public function testCompanyScoping($model) + public function testCompanyScoping($model): void { [$companyA, $companyB] = Company::factory()->count(2)->create(); @@ -69,7 +69,7 @@ class CompanyScopingTest extends TestCase $this->assertCanSee($modelB); } - public function testAssetMaintenanceCompanyScoping() + public function testAssetMaintenanceCompanyScoping(): void { [$companyA, $companyB] = Company::factory()->count(2)->create(); @@ -109,7 +109,7 @@ class CompanyScopingTest extends TestCase $this->assertCanSee($assetMaintenanceForCompanyB); } - public function testLicenseSeatCompanyScoping() + public function testLicenseSeatCompanyScoping(): void { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Unit/ComponentTest.php b/tests/Unit/ComponentTest.php index df8f64771f..f3f0f50ebd 100644 --- a/tests/Unit/ComponentTest.php +++ b/tests/Unit/ComponentTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class ComponentTest extends TestCase { - public function testAComponentBelongsToACompany() + public function testAComponentBelongsToACompany(): void { $component = Component::factory() ->create( @@ -20,14 +20,14 @@ class ComponentTest extends TestCase $this->assertInstanceOf(Company::class, $component->company); } - public function testAComponentHasALocation() + public function testAComponentHasALocation(): void { $component = Component::factory() ->create(['location_id' => Location::factory()->create()->id]); $this->assertInstanceOf(Location::class, $component->location); } - public function testAComponentBelongsToACategory() + public function testAComponentBelongsToACategory(): void { $component = Component::factory()->ramCrucial4() ->create( diff --git a/tests/Unit/CustomFieldTest.php b/tests/Unit/CustomFieldTest.php index d5704d8aa3..fe2c1e88ba 100644 --- a/tests/Unit/CustomFieldTest.php +++ b/tests/Unit/CustomFieldTest.php @@ -10,14 +10,14 @@ use Tests\TestCase; */ class CustomFieldTest extends TestCase { - public function testFormat() + public function testFormat(): void { $customfield = CustomField::factory()->make(['format' => 'IP']); $this->assertEquals($customfield->getAttributes()['format'], CustomField::PREDEFINED_FORMATS['IP']); //this seems undocumented... $this->assertEquals($customfield->format, 'IP'); } - public function testDbNameAscii() + public function testDbNameAscii(): void { $customfield = new CustomField(); $customfield->name = 'My hovercraft is full of eels'; @@ -26,7 +26,7 @@ class CustomFieldTest extends TestCase } // Western Europe - public function testDbNameLatin() + public function testDbNameLatin(): void { $customfield = new CustomField(); $customfield->name = 'My hovercraft is full of eels'; @@ -35,7 +35,7 @@ class CustomFieldTest extends TestCase } // Asian - public function testDbNameChinese() + public function testDbNameChinese(): void { $customfield = new CustomField(); $customfield->name = '我的氣墊船裝滿了鱔魚'; @@ -47,7 +47,7 @@ class CustomFieldTest extends TestCase } } - public function testDbNameJapanese() + public function testDbNameJapanese(): void { $customfield = new CustomField(); $customfield->name = '私のホバークラフトは鰻でいっぱいです'; @@ -59,7 +59,7 @@ class CustomFieldTest extends TestCase } } - public function testDbNameKorean() + public function testDbNameKorean(): void { $customfield = new CustomField(); $customfield->name = '내 호버크라프트는 장어로 가득 차 있어요'; @@ -72,7 +72,7 @@ class CustomFieldTest extends TestCase } // Nordic languages - public function testDbNameNonLatinEuro() + public function testDbNameNonLatinEuro(): void { $customfield = new CustomField(); $customfield->name = 'Mój poduszkowiec jest pełen węgorzy'; @@ -85,7 +85,7 @@ class CustomFieldTest extends TestCase } // - public function testDbNameTurkish() + public function testDbNameTurkish(): void { $customfield = new CustomField(); $customfield->name = 'Hoverkraftım yılan balığı dolu'; @@ -97,7 +97,7 @@ class CustomFieldTest extends TestCase } } - public function testDbNameArabic() + public function testDbNameArabic(): void { $customfield = new CustomField(); $customfield->name = 'حَوّامتي مُمْتِلئة بِأَنْقَلَيْسون'; diff --git a/tests/Unit/DepreciationTest.php b/tests/Unit/DepreciationTest.php index 4dd8422276..8cd51b3e2f 100644 --- a/tests/Unit/DepreciationTest.php +++ b/tests/Unit/DepreciationTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class DepreciationTest extends TestCase { - public function testADepreciationHasModels() + public function testADepreciationHasModels(): void { $depreciation = Depreciation::factory()->create(); @@ -26,7 +26,7 @@ class DepreciationTest extends TestCase $this->assertEquals(5, $depreciation->models->count()); } - public function testADepreciationHasLicenses() + public function testADepreciationHasLicenses(): void { $depreciation = Depreciation::factory()->create(); diff --git a/tests/Unit/Helpers/HelperTest.php b/tests/Unit/Helpers/HelperTest.php index 2fb1c58e26..83dddbc6a7 100644 --- a/tests/Unit/Helpers/HelperTest.php +++ b/tests/Unit/Helpers/HelperTest.php @@ -10,17 +10,17 @@ use Tests\TestCase; class HelperTest extends TestCase { - public function testDefaultChartColorsMethodHandlesHighValues() + public function testDefaultChartColorsMethodHandlesHighValues(): void { $this->assertIsString(Helper::defaultChartColors(1000)); } - public function testDefaultChartColorsMethodHandlesNegativeNumbers() + public function testDefaultChartColorsMethodHandlesNegativeNumbers(): void { $this->assertIsString(Helper::defaultChartColors(-1)); } - public function testParseCurrencyMethod() + public function testParseCurrencyMethod(): void { $this->settings->set(['default_currency' => 'USD']); $this->assertSame(12.34, Helper::ParseCurrency('USD 12.34')); @@ -28,7 +28,7 @@ class HelperTest extends TestCase $this->settings->set(['digit_separator' => '1.234,56']); $this->assertSame(12.34, Helper::ParseCurrency('12,34')); } - public function testGetRedirectOptionMethod() + public function testGetRedirectOptionMethod(): void { $test_data = [ 'Option target: redirect for user assigned to ' => [ diff --git a/tests/Unit/LdapTest.php b/tests/Unit/LdapTest.php index 65bdbe627c..596f4d5fe6 100644 --- a/tests/Unit/LdapTest.php +++ b/tests/Unit/LdapTest.php @@ -11,7 +11,7 @@ class LdapTest extends TestCase { use \phpmock\phpunit\PHPMock; - public function testConnect() + public function testConnect(): void { $this->settings->enableLdap(); @@ -31,14 +31,14 @@ class LdapTest extends TestCase // with/without ignore cert validation? // test (and mock) ldap_start_tls() ? - public function testBindAdmin() + public function testBindAdmin(): void { $this->settings->enableLdap(); $this->getFunctionMock("App\\Models", "ldap_bind")->expects($this->once())->willReturn(true); $this->assertNull(Ldap::bindAdminToLdap("dummy")); } - public function testBindBad() + public function testBindBad(): void { $this->settings->enableLdap(); $this->getFunctionMock("App\\Models", "ldap_bind")->expects($this->once())->willReturn(false); @@ -49,7 +49,7 @@ class LdapTest extends TestCase } // other test cases - test donked password? - public function testAnonymousBind() + public function testAnonymousBind(): void { //todo - would be nice to introspect somehow to make sure the right parameters were passed? $this->settings->enableAnonymousLdap(); @@ -57,7 +57,7 @@ class LdapTest extends TestCase $this->assertNull(Ldap::bindAdminToLdap("dummy")); } - public function testBadAnonymousBind() + public function testBadAnonymousBind(): void { $this->settings->enableAnonymousLdap(); $this->getFunctionMock("App\\Models", "ldap_bind")->expects($this->once())->willReturn(false); @@ -67,7 +67,7 @@ class LdapTest extends TestCase $this->assertNull(Ldap::bindAdminToLdap("dummy")); } - public function testBadEncryptedPassword() + public function testBadEncryptedPassword(): void { $this->settings->enableBadPasswordLdap(); @@ -75,7 +75,7 @@ class LdapTest extends TestCase $this->assertNull(Ldap::bindAdminToLdap("dummy")); } - public function testFindAndBind() + public function testFindAndBind(): void { $this->settings->enableLdap(); @@ -105,7 +105,7 @@ class LdapTest extends TestCase $this->assertEqualsCanonicalizing(["count" =>1,0 =>['sn' => 'Surname','firstname' => 'FirstName']],$results); } - public function testFindAndBindBadPassword() + public function testFindAndBindBadPassword(): void { $this->settings->enableLdap(); @@ -126,7 +126,7 @@ class LdapTest extends TestCase $this->assertFalse($results); } - public function testFindAndBindCannotFindSelf() + public function testFindAndBindCannotFindSelf(): void { $this->settings->enableLdap(); @@ -147,7 +147,7 @@ class LdapTest extends TestCase //maybe should do an AD test as well? - public function testFindLdapUsers() + public function testFindLdapUsers(): void { $this->settings->enableLdap(); @@ -170,7 +170,7 @@ class LdapTest extends TestCase $this->assertEqualsCanonicalizing(["count" => 1], $results); } - public function testFindLdapUsersPaginated() + public function testFindLdapUsersPaginated(): void { $this->settings->enableLdap(); diff --git a/tests/Unit/Listeners/LogListenerTest.php b/tests/Unit/Listeners/LogListenerTest.php index 011a5c51a4..18f72cfa14 100644 --- a/tests/Unit/Listeners/LogListenerTest.php +++ b/tests/Unit/Listeners/LogListenerTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; class LogListenerTest extends TestCase { - public function testLogsEntryOnCheckoutableCheckedOut() + public function testLogsEntryOnCheckoutableCheckedOut(): void { $asset = Asset::factory()->create(); $checkedOutTo = User::factory()->create(); diff --git a/tests/Unit/LocationTest.php b/tests/Unit/LocationTest.php index 3fded9e568..c8780e3966 100644 --- a/tests/Unit/LocationTest.php +++ b/tests/Unit/LocationTest.php @@ -6,7 +6,7 @@ use Tests\TestCase; class LocationTest extends TestCase { - public function testPassesIfNotSelfParent() + public function testPassesIfNotSelfParent(): void { $a = Location::factory()->make([ 'name' => 'Test Location', @@ -17,7 +17,7 @@ class LocationTest extends TestCase $this->assertTrue($a->isValid()); } - public function testFailsIfSelfParent() + public function testFailsIfSelfParent(): void { $a = Location::factory()->make([ 'name' => 'Test Location', diff --git a/tests/Unit/Models/Company/CompanyTest.php b/tests/Unit/Models/Company/CompanyTest.php index 6fd17e554b..ad803fe6ef 100644 --- a/tests/Unit/Models/Company/CompanyTest.php +++ b/tests/Unit/Models/Company/CompanyTest.php @@ -7,7 +7,7 @@ use Tests\TestCase; class CompanyTest extends TestCase { - public function testACompanyCanHaveUsers() + public function testACompanyCanHaveUsers(): void { $company = Company::factory()->create(); $user = User::factory() diff --git a/tests/Unit/Models/Company/GetIdForCurrentUserTest.php b/tests/Unit/Models/Company/GetIdForCurrentUserTest.php index 6d77c88731..0c4aeeb5fd 100644 --- a/tests/Unit/Models/Company/GetIdForCurrentUserTest.php +++ b/tests/Unit/Models/Company/GetIdForCurrentUserTest.php @@ -8,7 +8,7 @@ use Tests\TestCase; class GetIdForCurrentUserTest extends TestCase { - public function testReturnsProvidedValueWhenFullCompanySupportDisabled() + public function testReturnsProvidedValueWhenFullCompanySupportDisabled(): void { $this->settings->disableMultipleFullCompanySupport(); @@ -16,7 +16,7 @@ class GetIdForCurrentUserTest extends TestCase $this->assertEquals(1000, Company::getIdForCurrentUser(1000)); } - public function testReturnsProvidedValueForSuperUsersWhenFullCompanySupportEnabled() + public function testReturnsProvidedValueForSuperUsersWhenFullCompanySupportEnabled(): void { $this->settings->enableMultipleFullCompanySupport(); @@ -24,7 +24,7 @@ class GetIdForCurrentUserTest extends TestCase $this->assertEquals(2000, Company::getIdForCurrentUser(2000)); } - public function testReturnsNonSuperUsersCompanyIdWhenFullCompanySupportEnabled() + public function testReturnsNonSuperUsersCompanyIdWhenFullCompanySupportEnabled(): void { $this->settings->enableMultipleFullCompanySupport(); @@ -32,7 +32,7 @@ class GetIdForCurrentUserTest extends TestCase $this->assertEquals(2000, Company::getIdForCurrentUser(1000)); } - public function testReturnsProvidedValueForNonSuperUserWithoutCompanyIdWhenFullCompanySupportEnabled() + public function testReturnsProvidedValueForNonSuperUserWithoutCompanyIdWhenFullCompanySupportEnabled(): void { $this->settings->enableMultipleFullCompanySupport(); diff --git a/tests/Unit/Models/Labels/FieldOptionTest.php b/tests/Unit/Models/Labels/FieldOptionTest.php index 6616ab2304..05788d2d84 100644 --- a/tests/Unit/Models/Labels/FieldOptionTest.php +++ b/tests/Unit/Models/Labels/FieldOptionTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; class FieldOptionTest extends TestCase { - public function testItDisplaysAssignedToProperly() + public function testItDisplaysAssignedToProperly(): void { // "assignedTo" is a "special" value that can be used in the new label engine $fieldOption = FieldOption::fromString('Assigned To=assignedTo'); diff --git a/tests/Unit/NotificationTest.php b/tests/Unit/NotificationTest.php index 8005759a1e..7a61fd709a 100644 --- a/tests/Unit/NotificationTest.php +++ b/tests/Unit/NotificationTest.php @@ -12,7 +12,7 @@ use Tests\TestCase; class NotificationTest extends TestCase { - public function testAUserIsEmailedIfTheyCheckoutAnAssetWithEULA() + public function testAUserIsEmailedIfTheyCheckoutAnAssetWithEULA(): void { $admin = User::factory()->superuser()->create(); $user = User::factory()->create(); diff --git a/tests/Unit/SnipeModelTest.php b/tests/Unit/SnipeModelTest.php index 2bc81da61b..fe2a336ca8 100644 --- a/tests/Unit/SnipeModelTest.php +++ b/tests/Unit/SnipeModelTest.php @@ -6,7 +6,7 @@ use Tests\TestCase; class SnipeModelTest extends TestCase { - public function testSetsPurchaseDatesAppropriately() + public function testSetsPurchaseDatesAppropriately(): void { $c = new SnipeModel; $c->purchase_date = ''; @@ -15,7 +15,7 @@ class SnipeModelTest extends TestCase $this->assertTrue($c->purchase_date === '2016-03-25 12:35:50'); } - public function testSetsPurchaseCostsAppropriately() + public function testSetsPurchaseCostsAppropriately(): void { $c = new SnipeModel; $c->purchase_cost = '0.00'; @@ -26,7 +26,7 @@ class SnipeModelTest extends TestCase $this->assertTrue($c->purchase_cost === 9.5); } - public function testNullsBlankLocationIdsButNotOthers() + public function testNullsBlankLocationIdsButNotOthers(): void { $c = new SnipeModel; $c->location_id = ''; @@ -35,7 +35,7 @@ class SnipeModelTest extends TestCase $this->assertTrue($c->location_id == 5); } - public function testNullsBlankCategoriesButNotOthers() + public function testNullsBlankCategoriesButNotOthers(): void { $c = new SnipeModel; $c->category_id = ''; @@ -44,7 +44,7 @@ class SnipeModelTest extends TestCase $this->assertTrue($c->category_id == 1); } - public function testNullsBlankSuppliersButNotOthers() + public function testNullsBlankSuppliersButNotOthers(): void { $c = new SnipeModel; $c->supplier_id = ''; @@ -53,7 +53,7 @@ class SnipeModelTest extends TestCase $this->assertTrue($c->supplier_id == 4); } - public function testNullsBlankDepreciationsButNotOthers() + public function testNullsBlankDepreciationsButNotOthers(): void { $c = new SnipeModel; $c->depreciation_id = ''; @@ -62,7 +62,7 @@ class SnipeModelTest extends TestCase $this->assertTrue($c->depreciation_id == 4); } - public function testNullsBlankManufacturersButNotOthers() + public function testNullsBlankManufacturersButNotOthers(): void { $c = new SnipeModel; $c->manufacturer_id = ''; diff --git a/tests/Unit/SnipeTranslatorTest.php b/tests/Unit/SnipeTranslatorTest.php index d374bf9134..55ecaaa3c5 100644 --- a/tests/Unit/SnipeTranslatorTest.php +++ b/tests/Unit/SnipeTranslatorTest.php @@ -11,17 +11,17 @@ class SnipeTranslatorTest extends TestCase // WARNING: If these translation strings are updated, these tests will start to fail. Update them as appropriate. - public function testBasic() + public function testBasic(): void { $this->assertEquals('This user has admin privileges',trans('general.admin_tooltip',[],'en-US')); } - public function testPortuguese() + public function testPortuguese(): void { $this->assertEquals('Acessório',trans('general.accessory',[],'pt-PT')); } - public function testFallback() + public function testFallback(): void { $this->assertEquals( 'This user has admin privileges', @@ -30,7 +30,7 @@ class SnipeTranslatorTest extends TestCase ); } - public function testBackupString() + public function testBackupString(): void { $this->assertEquals( 'Ingen sikkerhetskopier ble gjort ennå', @@ -39,7 +39,7 @@ class SnipeTranslatorTest extends TestCase ); } - public function testBackupFallback() + public function testBackupFallback(): void { $this->assertEquals( 'No backups were made yet', @@ -49,7 +49,7 @@ class SnipeTranslatorTest extends TestCase } - public function testTransChoiceSingular() + public function testTransChoiceSingular(): void { $this->assertEquals( '1 Consumível', @@ -57,7 +57,7 @@ class SnipeTranslatorTest extends TestCase ); } - public function testTransChoicePlural() + public function testTransChoicePlural(): void { $this->assertEquals( '2 Consumíveis', @@ -65,7 +65,7 @@ class SnipeTranslatorTest extends TestCase ); } - public function testTotallyBogusKey() + public function testTotallyBogusKey(): void { $this->assertEquals( 'bogus_key', @@ -74,7 +74,7 @@ class SnipeTranslatorTest extends TestCase ); } - public function testReplacements() { + public function testReplacements(): void { $this->assertEquals( 'Artigos alocados a Some Name Here', trans('admin/users/general.assets_user',['name' => 'Some Name Here'],'pt-PT'), @@ -82,7 +82,7 @@ class SnipeTranslatorTest extends TestCase ); } - public function testNonlegacyBackupLocale() { + public function testNonlegacyBackupLocale(): void { //Spatie backup *usually* uses two-character locales, but pt-BR is an exception $this->assertEquals( 'Mensagem de exceção: MESSAGE', diff --git a/tests/Unit/StatuslabelTest.php b/tests/Unit/StatuslabelTest.php index fe5f3cacc0..e5dbc38244 100644 --- a/tests/Unit/StatuslabelTest.php +++ b/tests/Unit/StatuslabelTest.php @@ -6,37 +6,37 @@ use Tests\TestCase; class StatuslabelTest extends TestCase { - public function testRTDStatuslabelAdd() + public function testRTDStatuslabelAdd(): void { $statuslabel = Statuslabel::factory()->rtd()->create(); $this->assertModelExists($statuslabel); } - public function testPendingStatuslabelAdd() + public function testPendingStatuslabelAdd(): void { $statuslabel = Statuslabel::factory()->pending()->create(); $this->assertModelExists($statuslabel); } - public function testArchivedStatuslabelAdd() + public function testArchivedStatuslabelAdd(): void { $statuslabel = Statuslabel::factory()->archived()->create(); $this->assertModelExists($statuslabel); } - public function testOutForRepairStatuslabelAdd() + public function testOutForRepairStatuslabelAdd(): void { $statuslabel = Statuslabel::factory()->outForRepair()->create(); $this->assertModelExists($statuslabel); } - public function testBrokenStatuslabelAdd() + public function testBrokenStatuslabelAdd(): void { $statuslabel = Statuslabel::factory()->broken()->create(); $this->assertModelExists($statuslabel); } - public function testLostStatuslabelAdd() + public function testLostStatuslabelAdd(): void { $statuslabel = Statuslabel::factory()->lost()->create(); $this->assertModelExists($statuslabel); diff --git a/tests/Unit/UserTest.php b/tests/Unit/UserTest.php index e089fc4023..99e7b322d6 100644 --- a/tests/Unit/UserTest.php +++ b/tests/Unit/UserTest.php @@ -6,7 +6,7 @@ use Tests\TestCase; class UserTest extends TestCase { - public function testFirstNameSplit() + public function testFirstNameSplit(): void { $fullname = "Natalia Allanovna Romanova-O'Shostakova"; $expected_firstname = 'Natalia'; @@ -16,7 +16,7 @@ class UserTest extends TestCase $this->assertEquals($expected_lastname, $user['last_name']); } - public function testFirstName() + public function testFirstName(): void { $fullname = "Natalia Allanovna Romanova-O'Shostakova"; $expected_username = 'natalia'; @@ -24,7 +24,7 @@ class UserTest extends TestCase $this->assertEquals($expected_username, $user['username']); } - public function testFirstNameDotLastName() + public function testFirstNameDotLastName(): void { $fullname = "Natalia Allanovna Romanova-O'Shostakova"; $expected_username = 'natalia.allanovna-romanova-oshostakova'; @@ -32,7 +32,7 @@ class UserTest extends TestCase $this->assertEquals($expected_username, $user['username']); } - public function testLastNameFirstInitial() + public function testLastNameFirstInitial(): void { $fullname = "Natalia Allanovna Romanova-O'Shostakova"; $expected_username = 'allanovna-romanova-oshostakovan'; @@ -40,7 +40,7 @@ class UserTest extends TestCase $this->assertEquals($expected_username, $user['username']); } - public function testFirstInitialLastName() + public function testFirstInitialLastName(): void { $fullname = "Natalia Allanovna Romanova-O'Shostakova"; $expected_username = 'nallanovna-romanova-oshostakova'; @@ -48,7 +48,7 @@ class UserTest extends TestCase $this->assertEquals($expected_username, $user['username']); } - public function testFirstInitialUnderscoreLastName() + public function testFirstInitialUnderscoreLastName(): void { $fullname = "Natalia Allanovna Romanova-O'Shostakova"; $expected_username = 'nallanovna-romanova-oshostakova'; @@ -56,7 +56,7 @@ class UserTest extends TestCase $this->assertEquals($expected_username, $user['username']); } - public function testSingleName() + public function testSingleName(): void { $fullname = 'Natalia'; $expected_username = 'natalia'; From 95516b0343aa5755a95b330fcf4c5c3ccefedc69 Mon Sep 17 00:00:00 2001 From: Shift Date: Tue, 6 Aug 2024 20:25:22 +0000 Subject: [PATCH 06/12] Define test classes as `final` --- tests/Feature/AssetModels/Api/CreateAssetModelsTest.php | 2 +- tests/Feature/AssetModels/Api/IndexAssetModelsTest.php | 2 +- tests/Feature/AssetModels/Api/UpdateAssetModelsTest.php | 2 +- tests/Feature/AssetModels/Ui/CreateAssetModelsTest.php | 2 +- tests/Feature/AssetModels/Ui/IndexAssetModelsTest.php | 2 +- tests/Feature/AssetModels/Ui/UpdateAssetModelsTest.php | 2 +- tests/Feature/Assets/Api/AssetFilesTest.php | 2 +- tests/Feature/Assets/Api/AssetIndexTest.php | 2 +- tests/Feature/Assets/Api/AssetsForSelectListTest.php | 2 +- tests/Feature/Assets/Api/RequestableAssetTest.php | 2 +- tests/Feature/Assets/Api/StoreAssetTest.php | 2 +- tests/Feature/Assets/Api/UpdateAssetTest.php | 2 +- tests/Feature/Assets/Ui/BulkDeleteAssetsTest.php | 2 +- tests/Feature/Assets/Ui/BulkEditAssetsTest.php | 2 +- tests/Feature/Assets/Ui/CloneAssetTest.php | 2 +- tests/Feature/Assets/Ui/EditAssetTest.php | 2 +- tests/Feature/Categories/Api/CreateCategoriesTest.php | 2 +- tests/Feature/Categories/Api/IndexCategoriesTest.php | 2 +- tests/Feature/Categories/Api/UpdateCategoriesTest.php | 2 +- tests/Feature/Categories/Ui/CreateCategoriesTest.php | 2 +- tests/Feature/Categories/Ui/IndexCategoriesTest.php | 2 +- tests/Feature/Categories/Ui/UpdateCategoriesTest.php | 2 +- tests/Feature/Checkins/Api/AssetCheckinTest.php | 2 +- tests/Feature/Checkins/Ui/AccessoryCheckinTest.php | 2 +- tests/Feature/Checkins/Ui/AssetCheckinTest.php | 2 +- tests/Feature/Checkins/Ui/ComponentCheckinTest.php | 2 +- tests/Feature/Checkins/Ui/LicenseCheckinTest.php | 2 +- .../Feature/CheckoutAcceptances/Ui/AccessoryAcceptanceTest.php | 2 +- tests/Feature/Checkouts/Api/AccessoryCheckoutTest.php | 2 +- tests/Feature/Checkouts/Api/AssetCheckoutTest.php | 2 +- tests/Feature/Checkouts/Api/ConsumableCheckoutTest.php | 2 +- tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php | 2 +- tests/Feature/Checkouts/Ui/AssetCheckoutTest.php | 2 +- tests/Feature/Checkouts/Ui/ComponentsCheckoutTest.php | 2 +- tests/Feature/Checkouts/Ui/ConsumableCheckoutTest.php | 2 +- tests/Feature/Checkouts/Ui/LicenseCheckoutTest.php | 2 +- tests/Feature/Components/Api/ComponentIndexTest.php | 2 +- tests/Feature/Components/Ui/ComponentIndexTest.php | 2 +- tests/Feature/Console/MergeUsersTest.php | 2 +- tests/Feature/Console/OptimizeTest.php | 2 +- tests/Feature/Consumables/Api/ConsumableIndexTest.php | 2 +- tests/Feature/Consumables/Api/ConsumableUpdateTest.php | 2 +- tests/Feature/Consumables/Api/ConsumableViewTest.php | 2 +- tests/Feature/Consumables/Ui/ConsumableIndexTest.php | 2 +- tests/Feature/Consumables/Ui/ConsumableViewTest.php | 2 +- tests/Feature/DashboardTest.php | 2 +- tests/Feature/Departments/Api/CreateDepartmentsTest.php | 2 +- tests/Feature/Departments/Api/DepartmentsIndexTest.php | 2 +- tests/Feature/Departments/Api/UpdateDepartmentsTest.php | 2 +- tests/Feature/Departments/Ui/CreateDepartmentsTest.php | 2 +- tests/Feature/Departments/Ui/IndexDepartmentsTest.php | 2 +- tests/Feature/Departments/Ui/UpdateDepartmentsTest.php | 2 +- tests/Feature/Groups/Api/StoreGroupTest.php | 2 +- tests/Feature/Groups/Ui/IndexGroupTest.php | 2 +- tests/Feature/Licenses/Api/LicenseIndexTest.php | 2 +- tests/Feature/Licenses/Ui/CreateLicenseTest.php | 2 +- tests/Feature/Licenses/Ui/LicenseIndexTest.php | 2 +- tests/Feature/Licenses/Ui/LicenseViewTest.php | 2 +- tests/Feature/Livewire/CategoryEditFormTest.php | 2 +- tests/Feature/Locations/Api/CreateLocationsTest.php | 2 +- tests/Feature/Locations/Api/DeleteLocationsTest.php | 2 +- tests/Feature/Locations/Api/IndexLocationsTest.php | 2 +- tests/Feature/Locations/Api/LocationsForSelectListTest.php | 2 +- tests/Feature/Locations/Api/LocationsViewTest.php | 2 +- tests/Feature/Locations/Api/UpdateLocationsTest.php | 2 +- tests/Feature/Locations/Ui/CreateLocationsTest.php | 2 +- tests/Feature/Locations/Ui/IndexLocationsTest.php | 2 +- tests/Feature/Locations/Ui/UpdateLocationsTest.php | 2 +- .../Notifications/Email/EmailNotificationsUponCheckinTest.php | 2 +- .../Webhooks/SlackNotificationsUponCheckinTest.php | 2 +- .../Webhooks/SlackNotificationsUponCheckoutTest.php | 2 +- tests/Feature/Reporting/CustomReportTest.php | 2 +- tests/Feature/Reporting/UnacceptedAssetReportTest.php | 2 +- tests/Feature/Settings/BrandingSettingsTest.php | 2 +- tests/Feature/Settings/ShowSetUpPageTest.php | 2 +- tests/Feature/Users/Api/DeleteUserTest.php | 2 +- tests/Feature/Users/Api/RestoreUserTest.php | 2 +- tests/Feature/Users/Api/UpdateUserTest.php | 2 +- tests/Feature/Users/Api/UserSearchTest.php | 2 +- tests/Feature/Users/Api/UsersForSelectListTest.php | 2 +- tests/Feature/Users/Api/ViewUserTest.php | 2 +- tests/Feature/Users/Ui/DeleteUserTest.php | 2 +- tests/Feature/Users/Ui/MergeUsersTest.php | 2 +- tests/Feature/Users/Ui/UpdateUserTest.php | 2 +- tests/Feature/Users/Ui/ViewUserTest.php | 2 +- tests/Unit/AccessoryTest.php | 2 +- tests/Unit/AssetMaintenanceTest.php | 2 +- tests/Unit/AssetModelTest.php | 2 +- tests/Unit/AssetTest.php | 2 +- tests/Unit/CategoryTest.php | 2 +- tests/Unit/CompanyScopingTest.php | 2 +- tests/Unit/ComponentTest.php | 2 +- tests/Unit/CustomFieldTest.php | 2 +- tests/Unit/DepreciationTest.php | 2 +- tests/Unit/Helpers/HelperTest.php | 2 +- tests/Unit/LdapTest.php | 2 +- tests/Unit/Listeners/LogListenerTest.php | 2 +- tests/Unit/LocationTest.php | 2 +- tests/Unit/Models/Company/CompanyTest.php | 2 +- tests/Unit/Models/Company/GetIdForCurrentUserTest.php | 2 +- tests/Unit/Models/Labels/FieldOptionTest.php | 2 +- tests/Unit/NotificationTest.php | 2 +- tests/Unit/SnipeModelTest.php | 2 +- tests/Unit/SnipeTranslatorTest.php | 2 +- tests/Unit/StatuslabelTest.php | 2 +- tests/Unit/UserTest.php | 2 +- 106 files changed, 106 insertions(+), 106 deletions(-) diff --git a/tests/Feature/AssetModels/Api/CreateAssetModelsTest.php b/tests/Feature/AssetModels/Api/CreateAssetModelsTest.php index 9dd0400f64..7325c240b9 100644 --- a/tests/Feature/AssetModels/Api/CreateAssetModelsTest.php +++ b/tests/Feature/AssetModels/Api/CreateAssetModelsTest.php @@ -8,7 +8,7 @@ use App\Models\User; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -class CreateAssetModelsTest extends TestCase +final class CreateAssetModelsTest extends TestCase { diff --git a/tests/Feature/AssetModels/Api/IndexAssetModelsTest.php b/tests/Feature/AssetModels/Api/IndexAssetModelsTest.php index 4a672965d6..7f83c97c2a 100644 --- a/tests/Feature/AssetModels/Api/IndexAssetModelsTest.php +++ b/tests/Feature/AssetModels/Api/IndexAssetModelsTest.php @@ -8,7 +8,7 @@ use App\Models\User; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -class IndexAssetModelsTest extends TestCase +final class IndexAssetModelsTest extends TestCase { public function testViewingAssetModelIndexRequiresAuthentication(): void { diff --git a/tests/Feature/AssetModels/Api/UpdateAssetModelsTest.php b/tests/Feature/AssetModels/Api/UpdateAssetModelsTest.php index ab42dbdd64..c9cc7b6542 100644 --- a/tests/Feature/AssetModels/Api/UpdateAssetModelsTest.php +++ b/tests/Feature/AssetModels/Api/UpdateAssetModelsTest.php @@ -7,7 +7,7 @@ use App\Models\Category; use App\Models\User; use Tests\TestCase; -class UpdateAssetModelsTest extends TestCase +final class UpdateAssetModelsTest extends TestCase { public function testRequiresPermissionToEditAssetModel(): void diff --git a/tests/Feature/AssetModels/Ui/CreateAssetModelsTest.php b/tests/Feature/AssetModels/Ui/CreateAssetModelsTest.php index a959b66c9f..c2d51b3979 100644 --- a/tests/Feature/AssetModels/Ui/CreateAssetModelsTest.php +++ b/tests/Feature/AssetModels/Ui/CreateAssetModelsTest.php @@ -7,7 +7,7 @@ use App\Models\Category; use App\Models\User; use Tests\TestCase; -class CreateAssetModelsTest extends TestCase +final class CreateAssetModelsTest extends TestCase { public function testPermissionRequiredToCreateAssetModel(): void { diff --git a/tests/Feature/AssetModels/Ui/IndexAssetModelsTest.php b/tests/Feature/AssetModels/Ui/IndexAssetModelsTest.php index 4e4d6e66cc..69724a4a69 100644 --- a/tests/Feature/AssetModels/Ui/IndexAssetModelsTest.php +++ b/tests/Feature/AssetModels/Ui/IndexAssetModelsTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature\AssetModels\Ui; use App\Models\User; use Tests\TestCase; -class IndexAssetModelsTest extends TestCase +final class IndexAssetModelsTest extends TestCase { public function testPermissionRequiredToViewAssetModelList(): void { diff --git a/tests/Feature/AssetModels/Ui/UpdateAssetModelsTest.php b/tests/Feature/AssetModels/Ui/UpdateAssetModelsTest.php index f3eef58efe..33336fa38b 100644 --- a/tests/Feature/AssetModels/Ui/UpdateAssetModelsTest.php +++ b/tests/Feature/AssetModels/Ui/UpdateAssetModelsTest.php @@ -7,7 +7,7 @@ use App\Models\Category; use App\Models\User; use Tests\TestCase; -class UpdateAssetModelsTest extends TestCase +final class UpdateAssetModelsTest extends TestCase { public function testPermissionRequiredToStoreAssetModel(): void { diff --git a/tests/Feature/Assets/Api/AssetFilesTest.php b/tests/Feature/Assets/Api/AssetFilesTest.php index 6f51739135..ad30f96295 100644 --- a/tests/Feature/Assets/Api/AssetFilesTest.php +++ b/tests/Feature/Assets/Api/AssetFilesTest.php @@ -7,7 +7,7 @@ use App\Models\User; use Illuminate\Http\UploadedFile; use Tests\TestCase; -class AssetFilesTest extends TestCase +final class AssetFilesTest extends TestCase { public function testAssetApiAcceptsFileUpload(): void { diff --git a/tests/Feature/Assets/Api/AssetIndexTest.php b/tests/Feature/Assets/Api/AssetIndexTest.php index 4d40ba954a..0fd81862ac 100644 --- a/tests/Feature/Assets/Api/AssetIndexTest.php +++ b/tests/Feature/Assets/Api/AssetIndexTest.php @@ -9,7 +9,7 @@ use Carbon\Carbon; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -class AssetIndexTest extends TestCase +final class AssetIndexTest extends TestCase { public function testAssetApiIndexReturnsExpectedAssets(): void { diff --git a/tests/Feature/Assets/Api/AssetsForSelectListTest.php b/tests/Feature/Assets/Api/AssetsForSelectListTest.php index 603fab6178..b7837f7588 100644 --- a/tests/Feature/Assets/Api/AssetsForSelectListTest.php +++ b/tests/Feature/Assets/Api/AssetsForSelectListTest.php @@ -7,7 +7,7 @@ use App\Models\Company; use App\Models\User; use Tests\TestCase; -class AssetsForSelectListTest extends TestCase +final class AssetsForSelectListTest extends TestCase { public function testAssetsCanBeSearchedForByAssetTag(): void { diff --git a/tests/Feature/Assets/Api/RequestableAssetTest.php b/tests/Feature/Assets/Api/RequestableAssetTest.php index 28b916380a..10188e84e7 100644 --- a/tests/Feature/Assets/Api/RequestableAssetTest.php +++ b/tests/Feature/Assets/Api/RequestableAssetTest.php @@ -7,7 +7,7 @@ use App\Models\Company; use App\Models\User; use Tests\TestCase; -class RequestableAssetTest extends TestCase +final class RequestableAssetTest extends TestCase { public function testViewingRequestableAssetsRequiresCorrectPermission(): void { diff --git a/tests/Feature/Assets/Api/StoreAssetTest.php b/tests/Feature/Assets/Api/StoreAssetTest.php index 5eba2d94b4..320455aa42 100644 --- a/tests/Feature/Assets/Api/StoreAssetTest.php +++ b/tests/Feature/Assets/Api/StoreAssetTest.php @@ -14,7 +14,7 @@ use Illuminate\Support\Facades\Crypt; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -class StoreAssetTest extends TestCase +final class StoreAssetTest extends TestCase { public function testRequiresPermissionToCreateAsset(): void { diff --git a/tests/Feature/Assets/Api/UpdateAssetTest.php b/tests/Feature/Assets/Api/UpdateAssetTest.php index 65b89ede26..f964ea1aec 100644 --- a/tests/Feature/Assets/Api/UpdateAssetTest.php +++ b/tests/Feature/Assets/Api/UpdateAssetTest.php @@ -13,7 +13,7 @@ use App\Models\CustomField; use Illuminate\Support\Facades\Crypt; use Tests\TestCase; -class UpdateAssetTest extends TestCase +final class UpdateAssetTest extends TestCase { public function testThatANonExistentAssetIdReturnsError(): void { diff --git a/tests/Feature/Assets/Ui/BulkDeleteAssetsTest.php b/tests/Feature/Assets/Ui/BulkDeleteAssetsTest.php index 1470341fbd..3be29e2d58 100644 --- a/tests/Feature/Assets/Ui/BulkDeleteAssetsTest.php +++ b/tests/Feature/Assets/Ui/BulkDeleteAssetsTest.php @@ -8,7 +8,7 @@ use App\Models\Asset; use App\Models\User; use Tests\TestCase; -class BulkDeleteAssetsTest extends TestCase +final class BulkDeleteAssetsTest extends TestCase { public function testUserWithPermissionsCanAccessPage(): void { diff --git a/tests/Feature/Assets/Ui/BulkEditAssetsTest.php b/tests/Feature/Assets/Ui/BulkEditAssetsTest.php index ffc23cf584..3596852978 100644 --- a/tests/Feature/Assets/Ui/BulkEditAssetsTest.php +++ b/tests/Feature/Assets/Ui/BulkEditAssetsTest.php @@ -12,7 +12,7 @@ use App\Models\User; use Illuminate\Support\Facades\Crypt; use Tests\TestCase; -class BulkEditAssetsTest extends TestCase +final class BulkEditAssetsTest extends TestCase { public function testUserWithPermissionsCanAccessPage(): void { diff --git a/tests/Feature/Assets/Ui/CloneAssetTest.php b/tests/Feature/Assets/Ui/CloneAssetTest.php index 819f5cd161..ebf7cd6572 100644 --- a/tests/Feature/Assets/Ui/CloneAssetTest.php +++ b/tests/Feature/Assets/Ui/CloneAssetTest.php @@ -6,7 +6,7 @@ use App\Models\Asset; use App\Models\User; use Tests\TestCase; -class CloneAssetTest extends TestCase +final class CloneAssetTest extends TestCase { public function testPermissionRequiredToCreateAssetModel(): void { diff --git a/tests/Feature/Assets/Ui/EditAssetTest.php b/tests/Feature/Assets/Ui/EditAssetTest.php index 2c75649d31..6561df4722 100644 --- a/tests/Feature/Assets/Ui/EditAssetTest.php +++ b/tests/Feature/Assets/Ui/EditAssetTest.php @@ -8,7 +8,7 @@ use App\Models\StatusLabel; use App\Models\User; use Tests\TestCase; -class EditAssetTest extends TestCase +final class EditAssetTest extends TestCase { public function testPermissionRequiredToViewLicense(): void diff --git a/tests/Feature/Categories/Api/CreateCategoriesTest.php b/tests/Feature/Categories/Api/CreateCategoriesTest.php index 8d2d6d35bf..f5c0d6ac69 100644 --- a/tests/Feature/Categories/Api/CreateCategoriesTest.php +++ b/tests/Feature/Categories/Api/CreateCategoriesTest.php @@ -9,7 +9,7 @@ use App\Models\User; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -class CreateCategoriesTest extends TestCase +final class CreateCategoriesTest extends TestCase { diff --git a/tests/Feature/Categories/Api/IndexCategoriesTest.php b/tests/Feature/Categories/Api/IndexCategoriesTest.php index 04cbb516bc..a763dbbec3 100644 --- a/tests/Feature/Categories/Api/IndexCategoriesTest.php +++ b/tests/Feature/Categories/Api/IndexCategoriesTest.php @@ -7,7 +7,7 @@ use App\Models\User; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -class IndexCategoriesTest extends TestCase +final class IndexCategoriesTest extends TestCase { public function testViewingCategoryIndexRequiresPermission(): void diff --git a/tests/Feature/Categories/Api/UpdateCategoriesTest.php b/tests/Feature/Categories/Api/UpdateCategoriesTest.php index ebfdb862d2..6b3bd76add 100644 --- a/tests/Feature/Categories/Api/UpdateCategoriesTest.php +++ b/tests/Feature/Categories/Api/UpdateCategoriesTest.php @@ -6,7 +6,7 @@ use App\Models\Category; use App\Models\User; use Tests\TestCase; -class UpdateCategoriesTest extends TestCase +final class UpdateCategoriesTest extends TestCase { public function testCanUpdateCategoryViaPatchWithoutCategoryType(): void diff --git a/tests/Feature/Categories/Ui/CreateCategoriesTest.php b/tests/Feature/Categories/Ui/CreateCategoriesTest.php index 358d3564ce..5deffbe206 100644 --- a/tests/Feature/Categories/Ui/CreateCategoriesTest.php +++ b/tests/Feature/Categories/Ui/CreateCategoriesTest.php @@ -7,7 +7,7 @@ use App\Models\Category; use App\Models\User; use Tests\TestCase; -class CreateCategoriesTest extends TestCase +final class CreateCategoriesTest extends TestCase { public function testPermissionRequiredToCreateCategories(): void { diff --git a/tests/Feature/Categories/Ui/IndexCategoriesTest.php b/tests/Feature/Categories/Ui/IndexCategoriesTest.php index 231377f7cd..571e401b81 100644 --- a/tests/Feature/Categories/Ui/IndexCategoriesTest.php +++ b/tests/Feature/Categories/Ui/IndexCategoriesTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature\Categories\Ui; use App\Models\User; use Tests\TestCase; -class IndexCategoriesTest extends TestCase +final class IndexCategoriesTest extends TestCase { public function testPermissionRequiredToViewCategoryList(): void { diff --git a/tests/Feature/Categories/Ui/UpdateCategoriesTest.php b/tests/Feature/Categories/Ui/UpdateCategoriesTest.php index abe2f3092b..45e02a0a64 100644 --- a/tests/Feature/Categories/Ui/UpdateCategoriesTest.php +++ b/tests/Feature/Categories/Ui/UpdateCategoriesTest.php @@ -7,7 +7,7 @@ use App\Models\Asset; use App\Models\User; use Tests\TestCase; -class UpdateCategoriesTest extends TestCase +final class UpdateCategoriesTest extends TestCase { public function testPermissionRequiredToStoreCategory(): void { diff --git a/tests/Feature/Checkins/Api/AssetCheckinTest.php b/tests/Feature/Checkins/Api/AssetCheckinTest.php index d3b068e5b5..1891a9d282 100644 --- a/tests/Feature/Checkins/Api/AssetCheckinTest.php +++ b/tests/Feature/Checkins/Api/AssetCheckinTest.php @@ -13,7 +13,7 @@ use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Event; use Tests\TestCase; -class AssetCheckinTest extends TestCase +final class AssetCheckinTest extends TestCase { public function testCheckingInAssetRequiresCorrectPermission(): void { diff --git a/tests/Feature/Checkins/Ui/AccessoryCheckinTest.php b/tests/Feature/Checkins/Ui/AccessoryCheckinTest.php index 4e078a1b49..0eb63b4781 100644 --- a/tests/Feature/Checkins/Ui/AccessoryCheckinTest.php +++ b/tests/Feature/Checkins/Ui/AccessoryCheckinTest.php @@ -10,7 +10,7 @@ use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Notification; use Tests\TestCase; -class AccessoryCheckinTest extends TestCase +final class AccessoryCheckinTest extends TestCase { public function testCheckingInAccessoryRequiresCorrectPermission(): void { diff --git a/tests/Feature/Checkins/Ui/AssetCheckinTest.php b/tests/Feature/Checkins/Ui/AssetCheckinTest.php index a03a4c931d..fde1071296 100644 --- a/tests/Feature/Checkins/Ui/AssetCheckinTest.php +++ b/tests/Feature/Checkins/Ui/AssetCheckinTest.php @@ -13,7 +13,7 @@ use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Event; use Tests\TestCase; -class AssetCheckinTest extends TestCase +final class AssetCheckinTest extends TestCase { public function testCheckingInAssetRequiresCorrectPermission(): void { diff --git a/tests/Feature/Checkins/Ui/ComponentCheckinTest.php b/tests/Feature/Checkins/Ui/ComponentCheckinTest.php index 0da1282a47..a665d13ff2 100644 --- a/tests/Feature/Checkins/Ui/ComponentCheckinTest.php +++ b/tests/Feature/Checkins/Ui/ComponentCheckinTest.php @@ -6,7 +6,7 @@ use App\Models\Component; use App\Models\User; use Tests\TestCase; -class ComponentCheckinTest extends TestCase +final class ComponentCheckinTest extends TestCase { public function testCheckingInComponentRequiresCorrectPermission(): void { diff --git a/tests/Feature/Checkins/Ui/LicenseCheckinTest.php b/tests/Feature/Checkins/Ui/LicenseCheckinTest.php index 550f26ad44..248663860b 100644 --- a/tests/Feature/Checkins/Ui/LicenseCheckinTest.php +++ b/tests/Feature/Checkins/Ui/LicenseCheckinTest.php @@ -6,7 +6,7 @@ use App\Models\LicenseSeat; use App\Models\User; use Tests\TestCase; -class LicenseCheckinTest extends TestCase +final class LicenseCheckinTest extends TestCase { public function testCheckingInLicenseRequiresCorrectPermission(): void { diff --git a/tests/Feature/CheckoutAcceptances/Ui/AccessoryAcceptanceTest.php b/tests/Feature/CheckoutAcceptances/Ui/AccessoryAcceptanceTest.php index 13e3664548..de7c0af6cb 100644 --- a/tests/Feature/CheckoutAcceptances/Ui/AccessoryAcceptanceTest.php +++ b/tests/Feature/CheckoutAcceptances/Ui/AccessoryAcceptanceTest.php @@ -11,7 +11,7 @@ use App\Notifications\AcceptanceAssetDeclinedNotification; use Illuminate\Support\Facades\Notification; use Tests\TestCase; -class AccessoryAcceptanceTest extends TestCase +final class AccessoryAcceptanceTest extends TestCase { /** * This can be absorbed into a bigger test diff --git a/tests/Feature/Checkouts/Api/AccessoryCheckoutTest.php b/tests/Feature/Checkouts/Api/AccessoryCheckoutTest.php index 1b1b1c16bb..45c119de8e 100644 --- a/tests/Feature/Checkouts/Api/AccessoryCheckoutTest.php +++ b/tests/Feature/Checkouts/Api/AccessoryCheckoutTest.php @@ -9,7 +9,7 @@ use App\Notifications\CheckoutAccessoryNotification; use Illuminate\Support\Facades\Notification; use Tests\TestCase; -class AccessoryCheckoutTest extends TestCase +final class AccessoryCheckoutTest extends TestCase { public function testCheckingOutAccessoryRequiresCorrectPermission(): void { diff --git a/tests/Feature/Checkouts/Api/AssetCheckoutTest.php b/tests/Feature/Checkouts/Api/AssetCheckoutTest.php index b66ee2d02b..3ea610d01d 100644 --- a/tests/Feature/Checkouts/Api/AssetCheckoutTest.php +++ b/tests/Feature/Checkouts/Api/AssetCheckoutTest.php @@ -12,7 +12,7 @@ use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Event; use Tests\TestCase; -class AssetCheckoutTest extends TestCase +final class AssetCheckoutTest extends TestCase { protected function setUp(): void { diff --git a/tests/Feature/Checkouts/Api/ConsumableCheckoutTest.php b/tests/Feature/Checkouts/Api/ConsumableCheckoutTest.php index 8a060572ec..398f618239 100644 --- a/tests/Feature/Checkouts/Api/ConsumableCheckoutTest.php +++ b/tests/Feature/Checkouts/Api/ConsumableCheckoutTest.php @@ -9,7 +9,7 @@ use App\Notifications\CheckoutConsumableNotification; use Illuminate\Support\Facades\Notification; use Tests\TestCase; -class ConsumableCheckoutTest extends TestCase +final class ConsumableCheckoutTest extends TestCase { public function testCheckingOutConsumableRequiresCorrectPermission(): void { diff --git a/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php b/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php index cefd843880..47e057fdfd 100644 --- a/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php @@ -11,7 +11,7 @@ use App\Notifications\CheckoutAccessoryNotification; use Illuminate\Support\Facades\Notification; use Tests\TestCase; -class AccessoryCheckoutTest extends TestCase +final class AccessoryCheckoutTest extends TestCase { public function testCheckingOutAccessoryRequiresCorrectPermission(): void { diff --git a/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php b/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php index bb191d1ac7..64ddd30cf7 100644 --- a/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php @@ -15,7 +15,7 @@ use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Event; use Tests\TestCase; -class AssetCheckoutTest extends TestCase +final class AssetCheckoutTest extends TestCase { protected function setUp(): void { diff --git a/tests/Feature/Checkouts/Ui/ComponentsCheckoutTest.php b/tests/Feature/Checkouts/Ui/ComponentsCheckoutTest.php index f0d82dbf01..5f8e8d6f3e 100644 --- a/tests/Feature/Checkouts/Ui/ComponentsCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/ComponentsCheckoutTest.php @@ -7,7 +7,7 @@ use App\Models\Component; use App\Models\User; use Tests\TestCase; -class ComponentsCheckoutTest extends TestCase +final class ComponentsCheckoutTest extends TestCase { public function testCheckingOutComponentRequiresCorrectPermission(): void { diff --git a/tests/Feature/Checkouts/Ui/ConsumableCheckoutTest.php b/tests/Feature/Checkouts/Ui/ConsumableCheckoutTest.php index b27be6d482..e08d101a08 100644 --- a/tests/Feature/Checkouts/Ui/ConsumableCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/ConsumableCheckoutTest.php @@ -11,7 +11,7 @@ use App\Notifications\CheckoutConsumableNotification; use Illuminate\Support\Facades\Notification; use Tests\TestCase; -class ConsumableCheckoutTest extends TestCase +final class ConsumableCheckoutTest extends TestCase { public function testCheckingOutConsumableRequiresCorrectPermission(): void { diff --git a/tests/Feature/Checkouts/Ui/LicenseCheckoutTest.php b/tests/Feature/Checkouts/Ui/LicenseCheckoutTest.php index 49f0ddae89..6d8cb649a4 100644 --- a/tests/Feature/Checkouts/Ui/LicenseCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/LicenseCheckoutTest.php @@ -8,7 +8,7 @@ use App\Models\LicenseSeat; use App\Models\User; use Tests\TestCase; -class LicenseCheckoutTest extends TestCase +final class LicenseCheckoutTest extends TestCase { public function testNotesAreStoredInActionLogOnCheckoutToAsset(): void { diff --git a/tests/Feature/Components/Api/ComponentIndexTest.php b/tests/Feature/Components/Api/ComponentIndexTest.php index 300f0ec8f7..df1e91544c 100644 --- a/tests/Feature/Components/Api/ComponentIndexTest.php +++ b/tests/Feature/Components/Api/ComponentIndexTest.php @@ -7,7 +7,7 @@ use App\Models\Component; use App\Models\User; use Tests\TestCase; -class ComponentIndexTest extends TestCase +final class ComponentIndexTest extends TestCase { public function testComponentIndexAdheresToCompanyScoping(): void { diff --git a/tests/Feature/Components/Ui/ComponentIndexTest.php b/tests/Feature/Components/Ui/ComponentIndexTest.php index 1d8e2416ce..c0e8422fbc 100644 --- a/tests/Feature/Components/Ui/ComponentIndexTest.php +++ b/tests/Feature/Components/Ui/ComponentIndexTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature\Components\Ui; use App\Models\User; use Tests\TestCase; -class ComponentIndexTest extends TestCase +final class ComponentIndexTest extends TestCase { public function testPermissionRequiredToViewComponentsList(): void { diff --git a/tests/Feature/Console/MergeUsersTest.php b/tests/Feature/Console/MergeUsersTest.php index cbcc7007cb..e775e1c4a3 100644 --- a/tests/Feature/Console/MergeUsersTest.php +++ b/tests/Feature/Console/MergeUsersTest.php @@ -11,7 +11,7 @@ use App\Models\Actionlog; use Tests\TestCase; -class MergeUsersTest extends TestCase +final class MergeUsersTest extends TestCase { public function testAssetsAreTransferredOnUserMerge(): void { diff --git a/tests/Feature/Console/OptimizeTest.php b/tests/Feature/Console/OptimizeTest.php index 6a3926e308..a6648c363f 100644 --- a/tests/Feature/Console/OptimizeTest.php +++ b/tests/Feature/Console/OptimizeTest.php @@ -4,7 +4,7 @@ namespace Tests\Feature\Console; use Tests\TestCase; -class OptimizeTest extends TestCase +final class OptimizeTest extends TestCase { public function testOptimizeSucceeds(): void { diff --git a/tests/Feature/Consumables/Api/ConsumableIndexTest.php b/tests/Feature/Consumables/Api/ConsumableIndexTest.php index 93ea6f54b1..d4d4ca9ffe 100644 --- a/tests/Feature/Consumables/Api/ConsumableIndexTest.php +++ b/tests/Feature/Consumables/Api/ConsumableIndexTest.php @@ -7,7 +7,7 @@ use App\Models\Consumable; use App\Models\User; use Tests\TestCase; -class ConsumableIndexTest extends TestCase +final class ConsumableIndexTest extends TestCase { public function testConsumableIndexAdheresToCompanyScoping(): void { diff --git a/tests/Feature/Consumables/Api/ConsumableUpdateTest.php b/tests/Feature/Consumables/Api/ConsumableUpdateTest.php index 844c11d2c4..c622b820cc 100644 --- a/tests/Feature/Consumables/Api/ConsumableUpdateTest.php +++ b/tests/Feature/Consumables/Api/ConsumableUpdateTest.php @@ -7,7 +7,7 @@ use App\Models\Category; use App\Models\User; use Tests\TestCase; -class ConsumableUpdateTest extends TestCase +final class ConsumableUpdateTest extends TestCase { public function testCanUpdateConsumableViaPatchWithoutCategoryType(): void diff --git a/tests/Feature/Consumables/Api/ConsumableViewTest.php b/tests/Feature/Consumables/Api/ConsumableViewTest.php index d9218222a9..52bd4e31bd 100644 --- a/tests/Feature/Consumables/Api/ConsumableViewTest.php +++ b/tests/Feature/Consumables/Api/ConsumableViewTest.php @@ -7,7 +7,7 @@ use App\Models\Consumable; use App\Models\User; use Tests\TestCase; -class ConsumableViewTest extends TestCase +final class ConsumableViewTest extends TestCase { public function testConsumableViewAdheresToCompanyScoping(): void { diff --git a/tests/Feature/Consumables/Ui/ConsumableIndexTest.php b/tests/Feature/Consumables/Ui/ConsumableIndexTest.php index 16797c4ec0..a14d551d2a 100644 --- a/tests/Feature/Consumables/Ui/ConsumableIndexTest.php +++ b/tests/Feature/Consumables/Ui/ConsumableIndexTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature\Consumables\Ui; use App\Models\User; use Tests\TestCase; -class ConsumableIndexTest extends TestCase +final class ConsumableIndexTest extends TestCase { public function testPermissionRequiredToViewConsumablesList(): void { diff --git a/tests/Feature/Consumables/Ui/ConsumableViewTest.php b/tests/Feature/Consumables/Ui/ConsumableViewTest.php index 394be170db..7e53712071 100644 --- a/tests/Feature/Consumables/Ui/ConsumableViewTest.php +++ b/tests/Feature/Consumables/Ui/ConsumableViewTest.php @@ -6,7 +6,7 @@ use App\Models\Consumable; use App\Models\User; use Tests\TestCase; -class ConsumableViewTest extends TestCase +final class ConsumableViewTest extends TestCase { public function testPermissionRequiredToViewConsumable(): void { diff --git a/tests/Feature/DashboardTest.php b/tests/Feature/DashboardTest.php index 6857ace7dd..c8452763bb 100644 --- a/tests/Feature/DashboardTest.php +++ b/tests/Feature/DashboardTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature; use App\Models\User; use Tests\TestCase; -class DashboardTest extends TestCase +final class DashboardTest extends TestCase { public function testUsersWithoutAdminAccessAreRedirected(): void { diff --git a/tests/Feature/Departments/Api/CreateDepartmentsTest.php b/tests/Feature/Departments/Api/CreateDepartmentsTest.php index bda4711963..5796fd92f0 100644 --- a/tests/Feature/Departments/Api/CreateDepartmentsTest.php +++ b/tests/Feature/Departments/Api/CreateDepartmentsTest.php @@ -9,7 +9,7 @@ use App\Models\User; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -class CreateDepartmentsTest extends TestCase +final class CreateDepartmentsTest extends TestCase { diff --git a/tests/Feature/Departments/Api/DepartmentsIndexTest.php b/tests/Feature/Departments/Api/DepartmentsIndexTest.php index 7837199025..eff7f98a13 100644 --- a/tests/Feature/Departments/Api/DepartmentsIndexTest.php +++ b/tests/Feature/Departments/Api/DepartmentsIndexTest.php @@ -8,7 +8,7 @@ use App\Models\User; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -class DepartmentsIndexTest extends TestCase +final class DepartmentsIndexTest extends TestCase { public function testViewingDepartmentIndexRequiresAuthentication(): void { diff --git a/tests/Feature/Departments/Api/UpdateDepartmentsTest.php b/tests/Feature/Departments/Api/UpdateDepartmentsTest.php index 654408755c..5e884e6fbe 100644 --- a/tests/Feature/Departments/Api/UpdateDepartmentsTest.php +++ b/tests/Feature/Departments/Api/UpdateDepartmentsTest.php @@ -7,7 +7,7 @@ use App\Models\Category; use App\Models\User; use Tests\TestCase; -class UpdateDepartmentsTest extends TestCase +final class UpdateDepartmentsTest extends TestCase { public function testRequiresPermissionToEditDepartment(): void diff --git a/tests/Feature/Departments/Ui/CreateDepartmentsTest.php b/tests/Feature/Departments/Ui/CreateDepartmentsTest.php index ea4fdb674e..ef46fd13a8 100644 --- a/tests/Feature/Departments/Ui/CreateDepartmentsTest.php +++ b/tests/Feature/Departments/Ui/CreateDepartmentsTest.php @@ -7,7 +7,7 @@ use App\Models\Company; use App\Models\User; use Tests\TestCase; -class CreateDepartmentsTest extends TestCase +final class CreateDepartmentsTest extends TestCase { public function testPermissionRequiredToCreateDepartment(): void { diff --git a/tests/Feature/Departments/Ui/IndexDepartmentsTest.php b/tests/Feature/Departments/Ui/IndexDepartmentsTest.php index e35511b1ff..b642124ab0 100644 --- a/tests/Feature/Departments/Ui/IndexDepartmentsTest.php +++ b/tests/Feature/Departments/Ui/IndexDepartmentsTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature\Departments\Ui; use App\Models\User; use Tests\TestCase; -class IndexDepartmentsTest extends TestCase +final class IndexDepartmentsTest extends TestCase { public function testPermissionRequiredToViewDepartmentsList(): void { diff --git a/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php b/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php index 919835e0a7..a3864e4f2e 100644 --- a/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php +++ b/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php @@ -7,7 +7,7 @@ use App\Models\Category; use App\Models\User; use Tests\TestCase; -class UpdateDepartmentsTest extends TestCase +final class UpdateDepartmentsTest extends TestCase { public function testPermissionRequiredToStoreDepartment(): void { diff --git a/tests/Feature/Groups/Api/StoreGroupTest.php b/tests/Feature/Groups/Api/StoreGroupTest.php index 7619c5df69..df8f42ddfd 100644 --- a/tests/Feature/Groups/Api/StoreGroupTest.php +++ b/tests/Feature/Groups/Api/StoreGroupTest.php @@ -7,7 +7,7 @@ use App\Models\Group; use App\Models\User; use Tests\TestCase; -class StoreGroupTest extends TestCase +final class StoreGroupTest extends TestCase { public function testStoringGroupRequiresSuperAdminPermission(): void { diff --git a/tests/Feature/Groups/Ui/IndexGroupTest.php b/tests/Feature/Groups/Ui/IndexGroupTest.php index 29ba058d14..a39766e25d 100644 --- a/tests/Feature/Groups/Ui/IndexGroupTest.php +++ b/tests/Feature/Groups/Ui/IndexGroupTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature\Groups\Ui; use App\Models\User; use Tests\TestCase; -class IndexGroupTest extends TestCase +final class IndexGroupTest extends TestCase { public function testPermissionRequiredToViewGroupList(): void { diff --git a/tests/Feature/Licenses/Api/LicenseIndexTest.php b/tests/Feature/Licenses/Api/LicenseIndexTest.php index 621489f8e7..11d81b06f7 100644 --- a/tests/Feature/Licenses/Api/LicenseIndexTest.php +++ b/tests/Feature/Licenses/Api/LicenseIndexTest.php @@ -7,7 +7,7 @@ use App\Models\License; use App\Models\User; use Tests\TestCase; -class LicenseIndexTest extends TestCase +final class LicenseIndexTest extends TestCase { public function testLicensesIndexAdheresToCompanyScoping(): void { diff --git a/tests/Feature/Licenses/Ui/CreateLicenseTest.php b/tests/Feature/Licenses/Ui/CreateLicenseTest.php index c07818f01b..c302bbf61f 100644 --- a/tests/Feature/Licenses/Ui/CreateLicenseTest.php +++ b/tests/Feature/Licenses/Ui/CreateLicenseTest.php @@ -9,7 +9,7 @@ use App\Models\Depreciation; use App\Models\User; use Tests\TestCase; -class CreateLicenseTest extends TestCase +final class CreateLicenseTest extends TestCase { public function testPermissionRequiredToViewLicense(): void { diff --git a/tests/Feature/Licenses/Ui/LicenseIndexTest.php b/tests/Feature/Licenses/Ui/LicenseIndexTest.php index a370b8e864..381fe90980 100644 --- a/tests/Feature/Licenses/Ui/LicenseIndexTest.php +++ b/tests/Feature/Licenses/Ui/LicenseIndexTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature\Licenses\Ui; use App\Models\User; use Tests\TestCase; -class LicenseIndexTest extends TestCase +final class LicenseIndexTest extends TestCase { public function testPermissionRequiredToViewLicenseList(): void { diff --git a/tests/Feature/Licenses/Ui/LicenseViewTest.php b/tests/Feature/Licenses/Ui/LicenseViewTest.php index d0dd215ee4..1685e58bf3 100644 --- a/tests/Feature/Licenses/Ui/LicenseViewTest.php +++ b/tests/Feature/Licenses/Ui/LicenseViewTest.php @@ -7,7 +7,7 @@ use App\Models\Depreciation; use App\Models\User; use Tests\TestCase; -class LicenseViewTest extends TestCase +final class LicenseViewTest extends TestCase { public function testPermissionRequiredToViewLicense(): void { diff --git a/tests/Feature/Livewire/CategoryEditFormTest.php b/tests/Feature/Livewire/CategoryEditFormTest.php index 8f0948051c..3e75781d18 100644 --- a/tests/Feature/Livewire/CategoryEditFormTest.php +++ b/tests/Feature/Livewire/CategoryEditFormTest.php @@ -6,7 +6,7 @@ use App\Livewire\CategoryEditForm; use Livewire\Livewire; use Tests\TestCase; -class CategoryEditFormTest extends TestCase +final class CategoryEditFormTest extends TestCase { public function testTheComponentCanRender(): void { diff --git a/tests/Feature/Locations/Api/CreateLocationsTest.php b/tests/Feature/Locations/Api/CreateLocationsTest.php index 6903c8dada..b114266d4d 100644 --- a/tests/Feature/Locations/Api/CreateLocationsTest.php +++ b/tests/Feature/Locations/Api/CreateLocationsTest.php @@ -6,7 +6,7 @@ use App\Models\Location; use App\Models\User; use Tests\TestCase; -class CreateLocationsTest extends TestCase +final class CreateLocationsTest extends TestCase { public function testRequiresPermissionToCreateLocation(): void diff --git a/tests/Feature/Locations/Api/DeleteLocationsTest.php b/tests/Feature/Locations/Api/DeleteLocationsTest.php index 4041aa1216..111fdb1caf 100644 --- a/tests/Feature/Locations/Api/DeleteLocationsTest.php +++ b/tests/Feature/Locations/Api/DeleteLocationsTest.php @@ -7,7 +7,7 @@ use App\Models\Location; use App\Models\User; use Tests\TestCase; -class DeleteLocationsTest extends TestCase +final class DeleteLocationsTest extends TestCase { public function testErrorReturnedViaApiIfLocationDoesNotExist(): void diff --git a/tests/Feature/Locations/Api/IndexLocationsTest.php b/tests/Feature/Locations/Api/IndexLocationsTest.php index d9dec89c83..6a1a7474cf 100644 --- a/tests/Feature/Locations/Api/IndexLocationsTest.php +++ b/tests/Feature/Locations/Api/IndexLocationsTest.php @@ -8,7 +8,7 @@ use App\Models\User; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -class IndexLocationsTest extends TestCase +final class IndexLocationsTest extends TestCase { public function testViewingLocationIndexRequiresAuthentication(): void { diff --git a/tests/Feature/Locations/Api/LocationsForSelectListTest.php b/tests/Feature/Locations/Api/LocationsForSelectListTest.php index d9e0c7a880..563135dddb 100644 --- a/tests/Feature/Locations/Api/LocationsForSelectListTest.php +++ b/tests/Feature/Locations/Api/LocationsForSelectListTest.php @@ -7,7 +7,7 @@ use App\Models\User; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -class LocationsForSelectListTest extends TestCase +final class LocationsForSelectListTest extends TestCase { public function testGettingLocationListRequiresProperPermission(): void { diff --git a/tests/Feature/Locations/Api/LocationsViewTest.php b/tests/Feature/Locations/Api/LocationsViewTest.php index 15a320ed8d..270db594e8 100644 --- a/tests/Feature/Locations/Api/LocationsViewTest.php +++ b/tests/Feature/Locations/Api/LocationsViewTest.php @@ -7,7 +7,7 @@ use App\Models\Asset; use App\Models\User; use Tests\TestCase; -class LocationsViewTest extends TestCase +final class LocationsViewTest extends TestCase { public function testViewingLocationRequiresPermission(): void { diff --git a/tests/Feature/Locations/Api/UpdateLocationsTest.php b/tests/Feature/Locations/Api/UpdateLocationsTest.php index ce9bd570c1..6cc52cfc60 100644 --- a/tests/Feature/Locations/Api/UpdateLocationsTest.php +++ b/tests/Feature/Locations/Api/UpdateLocationsTest.php @@ -6,7 +6,7 @@ use App\Models\Location; use App\Models\User; use Tests\TestCase; -class UpdateLocationsTest extends TestCase +final class UpdateLocationsTest extends TestCase { public function testRequiresPermissionToEditLocation(): void diff --git a/tests/Feature/Locations/Ui/CreateLocationsTest.php b/tests/Feature/Locations/Ui/CreateLocationsTest.php index 4eb3a0d759..0994e69e06 100644 --- a/tests/Feature/Locations/Ui/CreateLocationsTest.php +++ b/tests/Feature/Locations/Ui/CreateLocationsTest.php @@ -7,7 +7,7 @@ use App\Models\Company; use App\Models\User; use Tests\TestCase; -class CreateLocationsTest extends TestCase +final class CreateLocationsTest extends TestCase { public function testPermissionRequiredToCreateLocation(): void { diff --git a/tests/Feature/Locations/Ui/IndexLocationsTest.php b/tests/Feature/Locations/Ui/IndexLocationsTest.php index 28aaeec6f7..cc74cfd919 100644 --- a/tests/Feature/Locations/Ui/IndexLocationsTest.php +++ b/tests/Feature/Locations/Ui/IndexLocationsTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature\Locations\Ui; use App\Models\User; use Tests\TestCase; -class IndexLocationsTest extends TestCase +final class IndexLocationsTest extends TestCase { public function testPermissionRequiredToViewLocationsList(): void { diff --git a/tests/Feature/Locations/Ui/UpdateLocationsTest.php b/tests/Feature/Locations/Ui/UpdateLocationsTest.php index 02fbb4813a..a93a679b79 100644 --- a/tests/Feature/Locations/Ui/UpdateLocationsTest.php +++ b/tests/Feature/Locations/Ui/UpdateLocationsTest.php @@ -6,7 +6,7 @@ use App\Models\Location; use App\Models\User; use Tests\TestCase; -class UpdateLocationsTest extends TestCase +final class UpdateLocationsTest extends TestCase { public function testPermissionRequiredToStoreLocation(): void { diff --git a/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php b/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php index 219cb528f8..2533050494 100644 --- a/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php +++ b/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php @@ -11,7 +11,7 @@ use Illuminate\Support\Facades\Notification; use Tests\TestCase; #[Group('notifications')] -class EmailNotificationsUponCheckinTest extends TestCase +final class EmailNotificationsUponCheckinTest extends TestCase { protected function setUp(): void { diff --git a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php index b6f6964ab1..b881dd9f14 100644 --- a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php +++ b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php @@ -19,7 +19,7 @@ use Illuminate\Support\Facades\Notification; use Tests\TestCase; #[Group('notifications')] -class SlackNotificationsUponCheckinTest extends TestCase +final class SlackNotificationsUponCheckinTest extends TestCase { protected function setUp(): void { diff --git a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php index 39af3f6c54..dd9633a8a4 100644 --- a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php +++ b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php @@ -21,7 +21,7 @@ use Illuminate\Support\Facades\Notification; use Tests\TestCase; #[Group('notifications')] -class SlackNotificationsUponCheckoutTest extends TestCase +final class SlackNotificationsUponCheckoutTest extends TestCase { protected function setUp(): void { diff --git a/tests/Feature/Reporting/CustomReportTest.php b/tests/Feature/Reporting/CustomReportTest.php index 015675016b..ce2053c162 100644 --- a/tests/Feature/Reporting/CustomReportTest.php +++ b/tests/Feature/Reporting/CustomReportTest.php @@ -10,7 +10,7 @@ use League\Csv\Reader; use PHPUnit\Framework\Assert; use Tests\TestCase; -class CustomReportTest extends TestCase +final class CustomReportTest extends TestCase { protected function setUp(): void { diff --git a/tests/Feature/Reporting/UnacceptedAssetReportTest.php b/tests/Feature/Reporting/UnacceptedAssetReportTest.php index 8325661e23..c987e82766 100644 --- a/tests/Feature/Reporting/UnacceptedAssetReportTest.php +++ b/tests/Feature/Reporting/UnacceptedAssetReportTest.php @@ -10,7 +10,7 @@ use League\Csv\Reader; use PHPUnit\Framework\Assert; use Tests\TestCase; -class UnacceptedAssetReportTest extends TestCase +final class UnacceptedAssetReportTest extends TestCase { protected function setUp(): void { diff --git a/tests/Feature/Settings/BrandingSettingsTest.php b/tests/Feature/Settings/BrandingSettingsTest.php index cb8665f1cb..4262b63e5d 100644 --- a/tests/Feature/Settings/BrandingSettingsTest.php +++ b/tests/Feature/Settings/BrandingSettingsTest.php @@ -10,7 +10,7 @@ use App\Models\User; use App\Models\Setting; -class BrandingSettingsTest extends TestCase +final class BrandingSettingsTest extends TestCase { public function testSiteNameIsRequired(): void { diff --git a/tests/Feature/Settings/ShowSetUpPageTest.php b/tests/Feature/Settings/ShowSetUpPageTest.php index 9fea64dd64..511b31fe4a 100644 --- a/tests/Feature/Settings/ShowSetUpPageTest.php +++ b/tests/Feature/Settings/ShowSetUpPageTest.php @@ -19,7 +19,7 @@ use Illuminate\Testing\TestResponse; use PDOException; use Tests\TestCase; -class ShowSetUpPageTest extends TestCase +final class ShowSetUpPageTest extends TestCase { /** * We do not want to make actual http request on every test to check .env file diff --git a/tests/Feature/Users/Api/DeleteUserTest.php b/tests/Feature/Users/Api/DeleteUserTest.php index 2fab34d059..070a40092b 100644 --- a/tests/Feature/Users/Api/DeleteUserTest.php +++ b/tests/Feature/Users/Api/DeleteUserTest.php @@ -8,7 +8,7 @@ use App\Models\Location; use App\Models\User; use Tests\TestCase; -class DeleteUserTest extends TestCase +final class DeleteUserTest extends TestCase { diff --git a/tests/Feature/Users/Api/RestoreUserTest.php b/tests/Feature/Users/Api/RestoreUserTest.php index 9ec087a87a..11c5e33d07 100644 --- a/tests/Feature/Users/Api/RestoreUserTest.php +++ b/tests/Feature/Users/Api/RestoreUserTest.php @@ -8,7 +8,7 @@ use App\Models\Location; use App\Models\User; use Tests\TestCase; -class RestoreUserTest extends TestCase +final class RestoreUserTest extends TestCase { diff --git a/tests/Feature/Users/Api/UpdateUserTest.php b/tests/Feature/Users/Api/UpdateUserTest.php index 4f64998a66..de6cf116ae 100644 --- a/tests/Feature/Users/Api/UpdateUserTest.php +++ b/tests/Feature/Users/Api/UpdateUserTest.php @@ -10,7 +10,7 @@ use App\Models\User; use Illuminate\Support\Facades\Hash; use Tests\TestCase; -class UpdateUserTest extends TestCase +final class UpdateUserTest extends TestCase { public function testCanUpdateUserViaPatch(): void { diff --git a/tests/Feature/Users/Api/UserSearchTest.php b/tests/Feature/Users/Api/UserSearchTest.php index 351fd12678..5dea41aa64 100644 --- a/tests/Feature/Users/Api/UserSearchTest.php +++ b/tests/Feature/Users/Api/UserSearchTest.php @@ -7,7 +7,7 @@ use App\Models\User; use Laravel\Passport\Passport; use Tests\TestCase; -class UserSearchTest extends TestCase +final class UserSearchTest extends TestCase { public function testCanSearchByUserFirstAndLastName(): void { diff --git a/tests/Feature/Users/Api/UsersForSelectListTest.php b/tests/Feature/Users/Api/UsersForSelectListTest.php index c79650f60a..2921bc4188 100644 --- a/tests/Feature/Users/Api/UsersForSelectListTest.php +++ b/tests/Feature/Users/Api/UsersForSelectListTest.php @@ -8,7 +8,7 @@ use Illuminate\Testing\Fluent\AssertableJson; use Laravel\Passport\Passport; use Tests\TestCase; -class UsersForSelectListTest extends TestCase +final class UsersForSelectListTest extends TestCase { public function testUsersAreReturned(): void { diff --git a/tests/Feature/Users/Api/ViewUserTest.php b/tests/Feature/Users/Api/ViewUserTest.php index e0ce78c11c..738907e5a3 100644 --- a/tests/Feature/Users/Api/ViewUserTest.php +++ b/tests/Feature/Users/Api/ViewUserTest.php @@ -8,7 +8,7 @@ use Illuminate\Testing\Fluent\AssertableJson; use Laravel\Passport\Passport; use Tests\TestCase; -class ViewUserTest extends TestCase +final class ViewUserTest extends TestCase { public function testCanReturnUser(): void diff --git a/tests/Feature/Users/Ui/DeleteUserTest.php b/tests/Feature/Users/Ui/DeleteUserTest.php index e0defe742b..6dd5d84f71 100644 --- a/tests/Feature/Users/Ui/DeleteUserTest.php +++ b/tests/Feature/Users/Ui/DeleteUserTest.php @@ -11,7 +11,7 @@ use App\Models\Company; use App\Models\Asset; -class DeleteUserTest extends TestCase +final class DeleteUserTest extends TestCase { public function testUserCanDeleteAnotherUser(): void diff --git a/tests/Feature/Users/Ui/MergeUsersTest.php b/tests/Feature/Users/Ui/MergeUsersTest.php index c8bab343e5..7877e94fb1 100644 --- a/tests/Feature/Users/Ui/MergeUsersTest.php +++ b/tests/Feature/Users/Ui/MergeUsersTest.php @@ -11,7 +11,7 @@ use App\Models\Actionlog; use Tests\TestCase; -class MergeUsersTest extends TestCase +final class MergeUsersTest extends TestCase { public function testAssetsAreTransferredOnUserMerge(): void { diff --git a/tests/Feature/Users/Ui/UpdateUserTest.php b/tests/Feature/Users/Ui/UpdateUserTest.php index 16caa7e6a9..9d8cc04dfc 100644 --- a/tests/Feature/Users/Ui/UpdateUserTest.php +++ b/tests/Feature/Users/Ui/UpdateUserTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature\Users\Ui; use App\Models\User; use Tests\TestCase; -class UpdateUserTest extends TestCase +final class UpdateUserTest extends TestCase { public function testUsersCanBeActivatedWithNumber(): void { diff --git a/tests/Feature/Users/Ui/ViewUserTest.php b/tests/Feature/Users/Ui/ViewUserTest.php index 5cd7051045..111e950f27 100644 --- a/tests/Feature/Users/Ui/ViewUserTest.php +++ b/tests/Feature/Users/Ui/ViewUserTest.php @@ -8,7 +8,7 @@ use App\Notifications\CurrentInventory; use Illuminate\Support\Facades\Notification; use Tests\TestCase; -class ViewUserTest extends TestCase +final class ViewUserTest extends TestCase { public function testPermissionsForUserDetailPage(): void { diff --git a/tests/Unit/AccessoryTest.php b/tests/Unit/AccessoryTest.php index af05be10fa..98021c5094 100644 --- a/tests/Unit/AccessoryTest.php +++ b/tests/Unit/AccessoryTest.php @@ -8,7 +8,7 @@ use App\Models\Category; use App\Models\Company; use Tests\TestCase; -class AccessoryTest extends TestCase +final class AccessoryTest extends TestCase { public function testAnAccessoryBelongsToACompany(): void { diff --git a/tests/Unit/AssetMaintenanceTest.php b/tests/Unit/AssetMaintenanceTest.php index b317de9934..f033ba9b8f 100644 --- a/tests/Unit/AssetMaintenanceTest.php +++ b/tests/Unit/AssetMaintenanceTest.php @@ -4,7 +4,7 @@ namespace Tests\Unit; use App\Models\AssetMaintenance; use Tests\TestCase; -class AssetMaintenanceTest extends TestCase +final class AssetMaintenanceTest extends TestCase { public function testZerosOutWarrantyIfBlank(): void { diff --git a/tests/Unit/AssetModelTest.php b/tests/Unit/AssetModelTest.php index 961560b5ab..9e4f8920f4 100644 --- a/tests/Unit/AssetModelTest.php +++ b/tests/Unit/AssetModelTest.php @@ -6,7 +6,7 @@ use App\Models\Category; use App\Models\AssetModel; use Tests\TestCase; -class AssetModelTest extends TestCase +final class AssetModelTest extends TestCase { public function testAnAssetModelContainsAssets(): void { diff --git a/tests/Unit/AssetTest.php b/tests/Unit/AssetTest.php index 619e34cc80..34b1876604 100644 --- a/tests/Unit/AssetTest.php +++ b/tests/Unit/AssetTest.php @@ -8,7 +8,7 @@ use Carbon\Carbon; use Tests\TestCase; use App\Models\Setting; -class AssetTest extends TestCase +final class AssetTest extends TestCase { public function testAutoIncrement(): void { diff --git a/tests/Unit/CategoryTest.php b/tests/Unit/CategoryTest.php index 1a7bfd1ba5..8e1fe83f83 100644 --- a/tests/Unit/CategoryTest.php +++ b/tests/Unit/CategoryTest.php @@ -6,7 +6,7 @@ use App\Models\AssetModel; use App\Models\Asset; use Tests\TestCase; -class CategoryTest extends TestCase +final class CategoryTest extends TestCase { public function testFailsEmptyValidation(): void { diff --git a/tests/Unit/CompanyScopingTest.php b/tests/Unit/CompanyScopingTest.php index 084c223e6a..a86a767dd0 100644 --- a/tests/Unit/CompanyScopingTest.php +++ b/tests/Unit/CompanyScopingTest.php @@ -15,7 +15,7 @@ use App\Models\User; use Illuminate\Database\Eloquent\Model; use Tests\TestCase; -class CompanyScopingTest extends TestCase +final class CompanyScopingTest extends TestCase { public static function models(): array { diff --git a/tests/Unit/ComponentTest.php b/tests/Unit/ComponentTest.php index f3f0f50ebd..8d411bc7d2 100644 --- a/tests/Unit/ComponentTest.php +++ b/tests/Unit/ComponentTest.php @@ -7,7 +7,7 @@ use App\Models\Component; use App\Models\Location; use Tests\TestCase; -class ComponentTest extends TestCase +final class ComponentTest extends TestCase { public function testAComponentBelongsToACompany(): void { diff --git a/tests/Unit/CustomFieldTest.php b/tests/Unit/CustomFieldTest.php index fe2c1e88ba..34b8f65758 100644 --- a/tests/Unit/CustomFieldTest.php +++ b/tests/Unit/CustomFieldTest.php @@ -8,7 +8,7 @@ use Tests\TestCase; * Test strings for db column names gathered from * http://www.omniglot.com/language/phrases/hovercraft.htm */ -class CustomFieldTest extends TestCase +final class CustomFieldTest extends TestCase { public function testFormat(): void { diff --git a/tests/Unit/DepreciationTest.php b/tests/Unit/DepreciationTest.php index 8cd51b3e2f..566c29fe10 100644 --- a/tests/Unit/DepreciationTest.php +++ b/tests/Unit/DepreciationTest.php @@ -7,7 +7,7 @@ use App\Models\License; use App\Models\AssetModel; use Tests\TestCase; -class DepreciationTest extends TestCase +final class DepreciationTest extends TestCase { public function testADepreciationHasModels(): void { diff --git a/tests/Unit/Helpers/HelperTest.php b/tests/Unit/Helpers/HelperTest.php index 83dddbc6a7..82a71fd915 100644 --- a/tests/Unit/Helpers/HelperTest.php +++ b/tests/Unit/Helpers/HelperTest.php @@ -8,7 +8,7 @@ use Illuminate\Support\Facades\Redirect; use Illuminate\Support\Facades\Session; use Tests\TestCase; -class HelperTest extends TestCase +final class HelperTest extends TestCase { public function testDefaultChartColorsMethodHandlesHighValues(): void { diff --git a/tests/Unit/LdapTest.php b/tests/Unit/LdapTest.php index 596f4d5fe6..f93c48be15 100644 --- a/tests/Unit/LdapTest.php +++ b/tests/Unit/LdapTest.php @@ -7,7 +7,7 @@ use App\Models\Ldap; use Tests\TestCase; #[Group('ldap')] -class LdapTest extends TestCase +final class LdapTest extends TestCase { use \phpmock\phpunit\PHPMock; diff --git a/tests/Unit/Listeners/LogListenerTest.php b/tests/Unit/Listeners/LogListenerTest.php index 18f72cfa14..3361886793 100644 --- a/tests/Unit/Listeners/LogListenerTest.php +++ b/tests/Unit/Listeners/LogListenerTest.php @@ -8,7 +8,7 @@ use App\Models\Asset; use App\Models\User; use Tests\TestCase; -class LogListenerTest extends TestCase +final class LogListenerTest extends TestCase { public function testLogsEntryOnCheckoutableCheckedOut(): void { diff --git a/tests/Unit/LocationTest.php b/tests/Unit/LocationTest.php index c8780e3966..1898d3f877 100644 --- a/tests/Unit/LocationTest.php +++ b/tests/Unit/LocationTest.php @@ -4,7 +4,7 @@ namespace Tests\Unit; use App\Models\Location; use Tests\TestCase; -class LocationTest extends TestCase +final class LocationTest extends TestCase { public function testPassesIfNotSelfParent(): void { diff --git a/tests/Unit/Models/Company/CompanyTest.php b/tests/Unit/Models/Company/CompanyTest.php index ad803fe6ef..5d5cbd2a67 100644 --- a/tests/Unit/Models/Company/CompanyTest.php +++ b/tests/Unit/Models/Company/CompanyTest.php @@ -5,7 +5,7 @@ use App\Models\Company; use App\Models\User; use Tests\TestCase; -class CompanyTest extends TestCase +final class CompanyTest extends TestCase { public function testACompanyCanHaveUsers(): void { diff --git a/tests/Unit/Models/Company/GetIdForCurrentUserTest.php b/tests/Unit/Models/Company/GetIdForCurrentUserTest.php index 0c4aeeb5fd..fff572c18c 100644 --- a/tests/Unit/Models/Company/GetIdForCurrentUserTest.php +++ b/tests/Unit/Models/Company/GetIdForCurrentUserTest.php @@ -6,7 +6,7 @@ use App\Models\Company; use App\Models\User; use Tests\TestCase; -class GetIdForCurrentUserTest extends TestCase +final class GetIdForCurrentUserTest extends TestCase { public function testReturnsProvidedValueWhenFullCompanySupportDisabled(): void { diff --git a/tests/Unit/Models/Labels/FieldOptionTest.php b/tests/Unit/Models/Labels/FieldOptionTest.php index 05788d2d84..4eb0829cb3 100644 --- a/tests/Unit/Models/Labels/FieldOptionTest.php +++ b/tests/Unit/Models/Labels/FieldOptionTest.php @@ -7,7 +7,7 @@ use App\Models\Labels\FieldOption; use App\Models\User; use Tests\TestCase; -class FieldOptionTest extends TestCase +final class FieldOptionTest extends TestCase { public function testItDisplaysAssignedToProperly(): void { diff --git a/tests/Unit/NotificationTest.php b/tests/Unit/NotificationTest.php index 7a61fd709a..b636bff7a6 100644 --- a/tests/Unit/NotificationTest.php +++ b/tests/Unit/NotificationTest.php @@ -10,7 +10,7 @@ use App\Notifications\CheckoutAssetNotification; use Illuminate\Support\Facades\Notification; use Tests\TestCase; -class NotificationTest extends TestCase +final class NotificationTest extends TestCase { public function testAUserIsEmailedIfTheyCheckoutAnAssetWithEULA(): void { diff --git a/tests/Unit/SnipeModelTest.php b/tests/Unit/SnipeModelTest.php index fe2a336ca8..7a95655abd 100644 --- a/tests/Unit/SnipeModelTest.php +++ b/tests/Unit/SnipeModelTest.php @@ -4,7 +4,7 @@ namespace Tests\Unit; use App\Models\SnipeModel; use Tests\TestCase; -class SnipeModelTest extends TestCase +final class SnipeModelTest extends TestCase { public function testSetsPurchaseDatesAppropriately(): void { diff --git a/tests/Unit/SnipeTranslatorTest.php b/tests/Unit/SnipeTranslatorTest.php index 55ecaaa3c5..6a582d0735 100644 --- a/tests/Unit/SnipeTranslatorTest.php +++ b/tests/Unit/SnipeTranslatorTest.php @@ -4,7 +4,7 @@ namespace Tests\Unit; use Tests\TestCase; -class SnipeTranslatorTest extends TestCase +final class SnipeTranslatorTest extends TestCase { // the 'meatiest' of these tests will explicitly choose non-English as the language, because otherwise // the fallback-logic (which is to fall-back to 'en-US') will be conflated in with the translation logic diff --git a/tests/Unit/StatuslabelTest.php b/tests/Unit/StatuslabelTest.php index e5dbc38244..dc57831fa3 100644 --- a/tests/Unit/StatuslabelTest.php +++ b/tests/Unit/StatuslabelTest.php @@ -4,7 +4,7 @@ namespace Tests\Unit; use App\Models\Statuslabel; use Tests\TestCase; -class StatuslabelTest extends TestCase +final class StatuslabelTest extends TestCase { public function testRTDStatuslabelAdd(): void { diff --git a/tests/Unit/UserTest.php b/tests/Unit/UserTest.php index 99e7b322d6..1d32bc83e9 100644 --- a/tests/Unit/UserTest.php +++ b/tests/Unit/UserTest.php @@ -4,7 +4,7 @@ namespace Tests\Unit; use App\Models\User; use Tests\TestCase; -class UserTest extends TestCase +final class UserTest extends TestCase { public function testFirstNameSplit(): void { From 82e795b6423cb56deace899c4e9e86cd6ac8cd13 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Tue, 6 Aug 2024 13:30:34 -0700 Subject: [PATCH 07/12] Revert "Add return types to test methods" This reverts commit 83fb6826eedf7e7adc066b394a616b472b178414. --- .../AssetModels/Api/CreateAssetModelsTest.php | 6 +-- .../AssetModels/Api/IndexAssetModelsTest.php | 8 ++-- .../AssetModels/Api/UpdateAssetModelsTest.php | 12 ++--- .../AssetModels/Ui/CreateAssetModelsTest.php | 6 +-- .../AssetModels/Ui/IndexAssetModelsTest.php | 4 +- .../AssetModels/Ui/UpdateAssetModelsTest.php | 6 +-- tests/Feature/Assets/Api/AssetFilesTest.php | 8 ++-- tests/Feature/Assets/Api/AssetIndexTest.php | 16 +++---- .../Assets/Api/AssetsForSelectListTest.php | 4 +- .../Assets/Api/RequestableAssetTest.php | 6 +-- tests/Feature/Assets/Api/StoreAssetTest.php | 48 +++++++++---------- tests/Feature/Assets/Api/UpdateAssetTest.php | 48 +++++++++---------- .../Assets/Ui/BulkDeleteAssetsTest.php | 16 +++---- .../Feature/Assets/Ui/BulkEditAssetsTest.php | 12 ++--- tests/Feature/Assets/Ui/CloneAssetTest.php | 4 +- tests/Feature/Assets/Ui/EditAssetTest.php | 6 +-- .../Categories/Api/CreateCategoriesTest.php | 8 ++-- .../Categories/Api/IndexCategoriesTest.php | 6 +-- .../Categories/Api/UpdateCategoriesTest.php | 4 +- .../Categories/Ui/CreateCategoriesTest.php | 6 +-- .../Categories/Ui/IndexCategoriesTest.php | 4 +- .../Categories/Ui/UpdateCategoriesTest.php | 10 ++-- .../Feature/Checkins/Api/AssetCheckinTest.php | 20 ++++---- .../Checkins/Ui/AccessoryCheckinTest.php | 8 ++-- .../Feature/Checkins/Ui/AssetCheckinTest.php | 28 +++++------ .../Checkins/Ui/ComponentCheckinTest.php | 6 +-- .../Checkins/Ui/LicenseCheckinTest.php | 2 +- .../Ui/AccessoryAcceptanceTest.php | 6 +-- .../Checkouts/Api/AccessoryCheckoutTest.php | 16 +++---- .../Checkouts/Api/AssetCheckoutTest.php | 18 +++---- .../Checkouts/Api/ConsumableCheckoutTest.php | 12 ++--- .../Checkouts/Ui/AccessoryCheckoutTest.php | 24 +++++----- .../Checkouts/Ui/AssetCheckoutTest.php | 30 ++++++------ .../Checkouts/Ui/ComponentsCheckoutTest.php | 8 ++-- .../Checkouts/Ui/ConsumableCheckoutTest.php | 18 +++---- .../Checkouts/Ui/LicenseCheckoutTest.php | 12 ++--- .../Components/Api/ComponentIndexTest.php | 2 +- .../Components/Ui/ComponentIndexTest.php | 4 +- tests/Feature/Console/MergeUsersTest.php | 2 +- tests/Feature/Console/OptimizeTest.php | 2 +- .../Consumables/Api/ConsumableIndexTest.php | 4 +- .../Consumables/Api/ConsumableUpdateTest.php | 4 +- .../Consumables/Api/ConsumableViewTest.php | 2 +- .../Consumables/Ui/ConsumableIndexTest.php | 4 +- .../Consumables/Ui/ConsumableViewTest.php | 4 +- tests/Feature/DashboardTest.php | 2 +- .../Departments/Api/CreateDepartmentsTest.php | 2 +- .../Departments/Api/DepartmentsIndexTest.php | 8 ++-- .../Departments/Api/UpdateDepartmentsTest.php | 4 +- .../Departments/Ui/CreateDepartmentsTest.php | 4 +- .../Departments/Ui/IndexDepartmentsTest.php | 4 +- .../Departments/Ui/UpdateDepartmentsTest.php | 4 +- tests/Feature/Groups/Api/StoreGroupTest.php | 8 ++-- tests/Feature/Groups/Ui/IndexGroupTest.php | 4 +- .../Feature/Licenses/Api/LicenseIndexTest.php | 2 +- .../Feature/Licenses/Ui/CreateLicenseTest.php | 4 +- .../Feature/Licenses/Ui/LicenseIndexTest.php | 4 +- tests/Feature/Licenses/Ui/LicenseViewTest.php | 4 +- .../Feature/Livewire/CategoryEditFormTest.php | 18 +++---- .../Locations/Api/CreateLocationsTest.php | 6 +-- .../Locations/Api/DeleteLocationsTest.php | 12 ++--- .../Locations/Api/IndexLocationsTest.php | 6 +-- .../Api/LocationsForSelectListTest.php | 6 +-- .../Locations/Api/LocationsViewTest.php | 6 +-- .../Locations/Api/UpdateLocationsTest.php | 4 +- .../Locations/Ui/CreateLocationsTest.php | 4 +- .../Locations/Ui/IndexLocationsTest.php | 4 +- .../Locations/Ui/UpdateLocationsTest.php | 6 +-- .../EmailNotificationsUponCheckinTest.php | 4 +- .../SlackNotificationsUponCheckinTest.php | 14 +++--- .../SlackNotificationsUponCheckoutTest.php | 18 +++---- tests/Feature/Reporting/CustomReportTest.php | 6 +-- .../Reporting/UnacceptedAssetReportTest.php | 4 +- .../Feature/Settings/BrandingSettingsTest.php | 26 +++++----- tests/Feature/Settings/ShowSetUpPageTest.php | 2 +- tests/Feature/Users/Api/DeleteUserTest.php | 18 +++---- tests/Feature/Users/Api/RestoreUserTest.php | 10 ++-- tests/Feature/Users/Api/UpdateUserTest.php | 24 +++++----- tests/Feature/Users/Api/UserSearchTest.php | 12 ++--- .../Users/Api/UsersForSelectListTest.php | 8 ++-- tests/Feature/Users/Api/ViewUserTest.php | 2 +- tests/Feature/Users/Ui/DeleteUserTest.php | 24 +++++----- tests/Feature/Users/Ui/MergeUsersTest.php | 14 +++--- tests/Feature/Users/Ui/UpdateUserTest.php | 10 ++-- tests/Feature/Users/Ui/ViewUserTest.php | 6 +-- tests/Unit/AccessoryTest.php | 8 ++-- tests/Unit/AssetMaintenanceTest.php | 8 ++-- tests/Unit/AssetModelTest.php | 2 +- tests/Unit/AssetTest.php | 18 +++---- tests/Unit/CategoryTest.php | 4 +- tests/Unit/CompanyScopingTest.php | 6 +-- tests/Unit/ComponentTest.php | 6 +-- tests/Unit/CustomFieldTest.php | 18 +++---- tests/Unit/DepreciationTest.php | 4 +- tests/Unit/Helpers/HelperTest.php | 8 ++-- tests/Unit/LdapTest.php | 22 ++++----- tests/Unit/Listeners/LogListenerTest.php | 2 +- tests/Unit/LocationTest.php | 4 +- tests/Unit/Models/Company/CompanyTest.php | 2 +- .../Company/GetIdForCurrentUserTest.php | 8 ++-- tests/Unit/Models/Labels/FieldOptionTest.php | 2 +- tests/Unit/NotificationTest.php | 2 +- tests/Unit/SnipeModelTest.php | 14 +++--- tests/Unit/SnipeTranslatorTest.php | 20 ++++---- tests/Unit/StatuslabelTest.php | 12 ++--- tests/Unit/UserTest.php | 14 +++--- 106 files changed, 498 insertions(+), 498 deletions(-) diff --git a/tests/Feature/AssetModels/Api/CreateAssetModelsTest.php b/tests/Feature/AssetModels/Api/CreateAssetModelsTest.php index 7325c240b9..cc072505a9 100644 --- a/tests/Feature/AssetModels/Api/CreateAssetModelsTest.php +++ b/tests/Feature/AssetModels/Api/CreateAssetModelsTest.php @@ -12,14 +12,14 @@ final class CreateAssetModelsTest extends TestCase { - public function testRequiresPermissionToCreateAssetModel(): void + public function testRequiresPermissionToCreateAssetModel() { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.models.store')) ->assertForbidden(); } - public function testCanCreateAssetModelWithAssetModelType(): void + public function testCanCreateAssetModelWithAssetModelType() { $response = $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.models.store'), [ @@ -37,7 +37,7 @@ final class CreateAssetModelsTest extends TestCase $this->assertEquals('Test AssetModel', $model->name); } - public function testCannotCreateAssetModelWithoutCategory(): void + public function testCannotCreateAssetModelWithoutCategory() { $response = $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.models.store'), [ diff --git a/tests/Feature/AssetModels/Api/IndexAssetModelsTest.php b/tests/Feature/AssetModels/Api/IndexAssetModelsTest.php index 7f83c97c2a..6afa23c939 100644 --- a/tests/Feature/AssetModels/Api/IndexAssetModelsTest.php +++ b/tests/Feature/AssetModels/Api/IndexAssetModelsTest.php @@ -10,19 +10,19 @@ use Tests\TestCase; final class IndexAssetModelsTest extends TestCase { - public function testViewingAssetModelIndexRequiresAuthentication(): void + public function testViewingAssetModelIndexRequiresAuthentication() { $this->getJson(route('api.models.index'))->assertRedirect(); } - public function testViewingAssetModelIndexRequiresPermission(): void + public function testViewingAssetModelIndexRequiresPermission() { $this->actingAsForApi(User::factory()->create()) ->getJson(route('api.models.index')) ->assertForbidden(); } - public function testAssetModelIndexReturnsExpectedAssetModels(): void + public function testAssetModelIndexReturnsExpectedAssetModels() { AssetModel::factory()->count(3)->create(); @@ -42,7 +42,7 @@ final class IndexAssetModelsTest extends TestCase ->assertJson(fn(AssertableJson $json) => $json->has('rows', 3)->etc()); } - public function testAssetModelIndexSearchReturnsExpectedAssetModels(): void + public function testAssetModelIndexSearchReturnsExpectedAssetModels() { AssetModel::factory()->count(3)->create(); AssetModel::factory()->count(1)->create(['name' => 'Test Model']); diff --git a/tests/Feature/AssetModels/Api/UpdateAssetModelsTest.php b/tests/Feature/AssetModels/Api/UpdateAssetModelsTest.php index c9cc7b6542..16401c3851 100644 --- a/tests/Feature/AssetModels/Api/UpdateAssetModelsTest.php +++ b/tests/Feature/AssetModels/Api/UpdateAssetModelsTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; final class UpdateAssetModelsTest extends TestCase { - public function testRequiresPermissionToEditAssetModel(): void + public function testRequiresPermissionToEditAssetModel() { $model = AssetModel::factory()->create(); $this->actingAsForApi(User::factory()->create()) @@ -18,7 +18,7 @@ final class UpdateAssetModelsTest extends TestCase ->assertForbidden(); } - public function testCanUpdateAssetModelViaPatch(): void + public function testCanUpdateAssetModelViaPatch() { $model = AssetModel::factory()->create(); @@ -37,7 +37,7 @@ final class UpdateAssetModelsTest extends TestCase } - public function testCannotUpdateAssetModelViaPatchWithAccessoryCategory(): void + public function testCannotUpdateAssetModelViaPatchWithAccessoryCategory() { $category = Category::factory()->forAccessories()->create(); $model = AssetModel::factory()->create(); @@ -57,7 +57,7 @@ final class UpdateAssetModelsTest extends TestCase $this->assertNotEquals('category_id', $category->id, 'Category ID was not updated'); } - public function testCannotUpdateAssetModelViaPatchWithLicenseCategory(): void + public function testCannotUpdateAssetModelViaPatchWithLicenseCategory() { $category = Category::factory()->forLicenses()->create(); $model = AssetModel::factory()->create(); @@ -77,7 +77,7 @@ final class UpdateAssetModelsTest extends TestCase $this->assertNotEquals('category_id', $category->id, 'Category ID was not updated'); } - public function testCannotUpdateAssetModelViaPatchWithConsumableCategory(): void + public function testCannotUpdateAssetModelViaPatchWithConsumableCategory() { $category = Category::factory()->forConsumables()->create(); $model = AssetModel::factory()->create(); @@ -97,7 +97,7 @@ final class UpdateAssetModelsTest extends TestCase $this->assertNotEquals('category_id', $category->id, 'Category ID was not updated'); } - public function testCannotUpdateAssetModelViaPatchWithComponentCategory(): void + public function testCannotUpdateAssetModelViaPatchWithComponentCategory() { $category = Category::factory()->forComponents()->create(); $model = AssetModel::factory()->create(); diff --git a/tests/Feature/AssetModels/Ui/CreateAssetModelsTest.php b/tests/Feature/AssetModels/Ui/CreateAssetModelsTest.php index c2d51b3979..37c5fce398 100644 --- a/tests/Feature/AssetModels/Ui/CreateAssetModelsTest.php +++ b/tests/Feature/AssetModels/Ui/CreateAssetModelsTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class CreateAssetModelsTest extends TestCase { - public function testPermissionRequiredToCreateAssetModel(): void + public function testPermissionRequiredToCreateAssetModel() { $this->actingAs(User::factory()->create()) ->post(route('models.store'), [ @@ -19,7 +19,7 @@ final class CreateAssetModelsTest extends TestCase ->assertForbidden(); } - public function testUserCanCreateAssetModels(): void + public function testUserCanCreateAssetModels() { $this->assertFalse(AssetModel::where('name', 'Test Model')->exists()); @@ -33,7 +33,7 @@ final class CreateAssetModelsTest extends TestCase $this->assertTrue(AssetModel::where('name', 'Test Model')->exists()); } - public function testUserCannotUseAccessoryCategoryTypeAsAssetModelCategoryType(): void + public function testUserCannotUseAccessoryCategoryTypeAsAssetModelCategoryType() { $response = $this->actingAs(User::factory()->superuser()->create()) diff --git a/tests/Feature/AssetModels/Ui/IndexAssetModelsTest.php b/tests/Feature/AssetModels/Ui/IndexAssetModelsTest.php index 69724a4a69..e2a65ae131 100644 --- a/tests/Feature/AssetModels/Ui/IndexAssetModelsTest.php +++ b/tests/Feature/AssetModels/Ui/IndexAssetModelsTest.php @@ -7,14 +7,14 @@ use Tests\TestCase; final class IndexAssetModelsTest extends TestCase { - public function testPermissionRequiredToViewAssetModelList(): void + public function testPermissionRequiredToViewAssetModelList() { $this->actingAs(User::factory()->create()) ->get(route('models.index')) ->assertForbidden(); } - public function testUserCanListAssetModels(): void + public function testUserCanListAssetModels() { $this->actingAs(User::factory()->superuser()->create()) ->get(route('models.index')) diff --git a/tests/Feature/AssetModels/Ui/UpdateAssetModelsTest.php b/tests/Feature/AssetModels/Ui/UpdateAssetModelsTest.php index 33336fa38b..3d459413bb 100644 --- a/tests/Feature/AssetModels/Ui/UpdateAssetModelsTest.php +++ b/tests/Feature/AssetModels/Ui/UpdateAssetModelsTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class UpdateAssetModelsTest extends TestCase { - public function testPermissionRequiredToStoreAssetModel(): void + public function testPermissionRequiredToStoreAssetModel() { $this->actingAs(User::factory()->create()) ->post(route('models.store'), [ @@ -20,7 +20,7 @@ final class UpdateAssetModelsTest extends TestCase ->assertForbidden(); } - public function testUserCanEditAssetModels(): void + public function testUserCanEditAssetModels() { $category = Category::factory()->forAssets()->create(); $model = AssetModel::factory()->create(['name' => 'Test Model', 'category_id' => $category->id]); @@ -40,7 +40,7 @@ final class UpdateAssetModelsTest extends TestCase } - public function testUserCannotChangeAssetModelCategoryType(): void + public function testUserCannotChangeAssetModelCategoryType() { $category = Category::factory()->forAssets()->create(); $model = AssetModel::factory()->create(['name' => 'Test Model', 'category_id' => $category->id]); diff --git a/tests/Feature/Assets/Api/AssetFilesTest.php b/tests/Feature/Assets/Api/AssetFilesTest.php index ad30f96295..136e90aa28 100644 --- a/tests/Feature/Assets/Api/AssetFilesTest.php +++ b/tests/Feature/Assets/Api/AssetFilesTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class AssetFilesTest extends TestCase { - public function testAssetApiAcceptsFileUpload(): void + public function testAssetApiAcceptsFileUpload() { // Upload a file to an asset @@ -28,7 +28,7 @@ final class AssetFilesTest extends TestCase ->assertOk(); } - public function testAssetApiListsFiles(): void + public function testAssetApiListsFiles() { // List all files on an asset @@ -50,7 +50,7 @@ final class AssetFilesTest extends TestCase ]); } - public function testAssetApiDownloadsFile(): void + public function testAssetApiDownloadsFile() { // Download a file from an asset @@ -84,7 +84,7 @@ final class AssetFilesTest extends TestCase ->assertOk(); } - public function testAssetApiDeletesFile(): void + public function testAssetApiDeletesFile() { // Delete a file from an asset diff --git a/tests/Feature/Assets/Api/AssetIndexTest.php b/tests/Feature/Assets/Api/AssetIndexTest.php index 0fd81862ac..797499137d 100644 --- a/tests/Feature/Assets/Api/AssetIndexTest.php +++ b/tests/Feature/Assets/Api/AssetIndexTest.php @@ -11,7 +11,7 @@ use Tests\TestCase; final class AssetIndexTest extends TestCase { - public function testAssetApiIndexReturnsExpectedAssets(): void + public function testAssetApiIndexReturnsExpectedAssets() { Asset::factory()->count(3)->create(); @@ -31,7 +31,7 @@ final class AssetIndexTest extends TestCase ->assertJson(fn(AssertableJson $json) => $json->has('rows', 3)->etc()); } - public function testAssetApiIndexReturnsDisplayUpcomingAuditsDue(): void + public function testAssetApiIndexReturnsDisplayUpcomingAuditsDue() { Asset::factory()->count(3)->create(['next_audit_date' => Carbon::now()->format('Y-m-d')]); @@ -47,7 +47,7 @@ final class AssetIndexTest extends TestCase ->assertJson(fn(AssertableJson $json) => $json->has('rows', 3)->etc()); } - public function testAssetApiIndexReturnsOverdueForAudit(): void + public function testAssetApiIndexReturnsOverdueForAudit() { Asset::factory()->count(3)->create(['next_audit_date' => Carbon::now()->subDays(1)->format('Y-m-d')]); @@ -63,7 +63,7 @@ final class AssetIndexTest extends TestCase } - public function testAssetApiIndexReturnsDueOrOverdueForAudit(): void + public function testAssetApiIndexReturnsDueOrOverdueForAudit() { Asset::factory()->count(3)->create(['next_audit_date' => Carbon::now()->format('Y-m-d')]); Asset::factory()->count(2)->create(['next_audit_date' => Carbon::now()->subDays(1)->format('Y-m-d')]); @@ -81,7 +81,7 @@ final class AssetIndexTest extends TestCase - public function testAssetApiIndexReturnsDueForExpectedCheckin(): void + public function testAssetApiIndexReturnsDueForExpectedCheckin() { Asset::factory()->count(3)->create(['assigned_to' => '1', 'expected_checkin' => Carbon::now()->format('Y-m-d')]); @@ -97,7 +97,7 @@ final class AssetIndexTest extends TestCase ->assertJson(fn(AssertableJson $json) => $json->has('rows', 3)->etc()); } - public function testAssetApiIndexReturnsOverdueForExpectedCheckin(): void + public function testAssetApiIndexReturnsOverdueForExpectedCheckin() { Asset::factory()->count(3)->create(['assigned_to' => '1', 'expected_checkin' => Carbon::now()->subDays(1)->format('Y-m-d')]); @@ -111,7 +111,7 @@ final class AssetIndexTest extends TestCase ->assertJson(fn(AssertableJson $json) => $json->has('rows', 3)->etc()); } - public function testAssetApiIndexReturnsDueOrOverdueForExpectedCheckin(): void + public function testAssetApiIndexReturnsDueOrOverdueForExpectedCheckin() { Asset::factory()->count(3)->create(['assigned_to' => '1', 'expected_checkin' => Carbon::now()->subDays(1)->format('Y-m-d')]); Asset::factory()->count(2)->create(['assigned_to' => '1', 'expected_checkin' => Carbon::now()->format('Y-m-d')]); @@ -126,7 +126,7 @@ final class AssetIndexTest extends TestCase ->assertJson(fn(AssertableJson $json) => $json->has('rows', 5)->etc()); } - public function testAssetApiIndexAdheresToCompanyScoping(): void + public function testAssetApiIndexAdheresToCompanyScoping() { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Feature/Assets/Api/AssetsForSelectListTest.php b/tests/Feature/Assets/Api/AssetsForSelectListTest.php index b7837f7588..a44996f63b 100644 --- a/tests/Feature/Assets/Api/AssetsForSelectListTest.php +++ b/tests/Feature/Assets/Api/AssetsForSelectListTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class AssetsForSelectListTest extends TestCase { - public function testAssetsCanBeSearchedForByAssetTag(): void + public function testAssetsCanBeSearchedForByAssetTag() { Asset::factory()->create(['asset_tag' => '0001']); Asset::factory()->create(['asset_tag' => '0002']); @@ -25,7 +25,7 @@ final class AssetsForSelectListTest extends TestCase $this->assertTrue($results->pluck('text')->contains(fn($text) => str_contains($text, '0002'))); } - public function testAssetsAreScopedToCompanyWhenMultipleCompanySupportEnabled(): void + public function testAssetsAreScopedToCompanyWhenMultipleCompanySupportEnabled() { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Feature/Assets/Api/RequestableAssetTest.php b/tests/Feature/Assets/Api/RequestableAssetTest.php index 10188e84e7..9fc81a5ff3 100644 --- a/tests/Feature/Assets/Api/RequestableAssetTest.php +++ b/tests/Feature/Assets/Api/RequestableAssetTest.php @@ -9,14 +9,14 @@ use Tests\TestCase; final class RequestableAssetTest extends TestCase { - public function testViewingRequestableAssetsRequiresCorrectPermission(): void + public function testViewingRequestableAssetsRequiresCorrectPermission() { $this->actingAsForApi(User::factory()->create()) ->getJson(route('api.assets.requestable')) ->assertForbidden(); } - public function testReturnsRequestableAssets(): void + public function testReturnsRequestableAssets() { $requestableAsset = Asset::factory()->requestable()->create(['asset_tag' => 'requestable']); $nonRequestableAsset = Asset::factory()->nonrequestable()->create(['asset_tag' => 'non-requestable']); @@ -28,7 +28,7 @@ final class RequestableAssetTest extends TestCase ->assertResponseDoesNotContainInRows($nonRequestableAsset, 'asset_tag'); } - public function testRequestableAssetsAreScopedToCompanyWhenMultipleCompanySupportEnabled(): void + public function testRequestableAssetsAreScopedToCompanyWhenMultipleCompanySupportEnabled() { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Feature/Assets/Api/StoreAssetTest.php b/tests/Feature/Assets/Api/StoreAssetTest.php index 320455aa42..437c456a67 100644 --- a/tests/Feature/Assets/Api/StoreAssetTest.php +++ b/tests/Feature/Assets/Api/StoreAssetTest.php @@ -16,14 +16,14 @@ use Tests\TestCase; final class StoreAssetTest extends TestCase { - public function testRequiresPermissionToCreateAsset(): void + public function testRequiresPermissionToCreateAsset() { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.assets.store')) ->assertForbidden(); } - public function testAllAssetAttributesAreStored(): void + public function testAllAssetAttributesAreStored() { $company = Company::factory()->create(); $location = Location::factory()->create(); @@ -83,7 +83,7 @@ final class StoreAssetTest extends TestCase $this->assertEquals(10, $asset->warranty_months); } - public function testSetsLastAuditDateToMidnightOfProvidedDate(): void + public function testSetsLastAuditDateToMidnightOfProvidedDate() { $response = $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.assets.store'), [ @@ -99,7 +99,7 @@ final class StoreAssetTest extends TestCase $this->assertEquals('2023-09-03 00:00:00', $asset->last_audit_date); } - public function testLastAuditDateCanBeNull(): void + public function testLastAuditDateCanBeNull() { $response = $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.assets.store'), [ @@ -115,7 +115,7 @@ final class StoreAssetTest extends TestCase $this->assertNull($asset->last_audit_date); } - public function testNonDateUsedForLastAuditDateReturnsValidationError(): void + public function testNonDateUsedForLastAuditDateReturnsValidationError() { $response = $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.assets.store'), [ @@ -129,7 +129,7 @@ final class StoreAssetTest extends TestCase $this->assertNotNull($response->json('messages.last_audit_date')); } - public function testArchivedDepreciateAndPhysicalCanBeNull(): void + public function testArchivedDepreciateAndPhysicalCanBeNull() { $model = AssetModel::factory()->ipadModel()->create(); $status = Statuslabel::factory()->create(); @@ -154,7 +154,7 @@ final class StoreAssetTest extends TestCase $this->assertEquals(0, $asset->depreciate); } - public function testArchivedDepreciateAndPhysicalCanBeEmpty(): void + public function testArchivedDepreciateAndPhysicalCanBeEmpty() { $model = AssetModel::factory()->ipadModel()->create(); $status = Statuslabel::factory()->create(); @@ -179,7 +179,7 @@ final class StoreAssetTest extends TestCase $this->assertEquals(0, $asset->depreciate); } - public function testAssetEolDateIsCalculatedIfPurchaseDateSet(): void + public function testAssetEolDateIsCalculatedIfPurchaseDateSet() { $model = AssetModel::factory()->mbp13Model()->create(); $status = Statuslabel::factory()->create(); @@ -200,7 +200,7 @@ final class StoreAssetTest extends TestCase $this->assertEquals('2024-01-01', $asset->asset_eol_date); } - public function testAssetEolDateIsNotCalculatedIfPurchaseDateNotSet(): void + public function testAssetEolDateIsNotCalculatedIfPurchaseDateNotSet() { $model = AssetModel::factory()->mbp13Model()->create(); $status = Statuslabel::factory()->create(); @@ -220,7 +220,7 @@ final class StoreAssetTest extends TestCase $this->assertNull($asset->asset_eol_date); } - public function testAssetEolExplicitIsSetIfAssetEolDateIsExplicitlySet(): void + public function testAssetEolExplicitIsSetIfAssetEolDateIsExplicitlySet() { $model = AssetModel::factory()->mbp13Model()->create(); $status = Statuslabel::factory()->create(); @@ -242,7 +242,7 @@ final class StoreAssetTest extends TestCase $this->assertTrue($asset->eol_explicit); } - public function testAssetGetsAssetTagWithAutoIncrement(): void + public function testAssetGetsAssetTagWithAutoIncrement() { $model = AssetModel::factory()->create(); $status = Statuslabel::factory()->create(); @@ -262,7 +262,7 @@ final class StoreAssetTest extends TestCase $this->assertNotNull($asset->asset_tag); } - public function testAssetCreationFailsWithNoAssetTagOrAutoIncrement(): void + public function testAssetCreationFailsWithNoAssetTagOrAutoIncrement() { $model = AssetModel::factory()->create(); $status = Statuslabel::factory()->create(); @@ -278,7 +278,7 @@ final class StoreAssetTest extends TestCase ->assertStatusMessageIs('error'); } - public function testStoresPeriodAsDecimalSeparatorForPurchaseCost(): void + public function testStoresPeriodAsDecimalSeparatorForPurchaseCost() { $this->settings->set([ 'default_currency' => 'USD', @@ -300,7 +300,7 @@ final class StoreAssetTest extends TestCase $this->assertEquals(12.34, $asset->purchase_cost); } - public function testStoresPeriodAsCommaSeparatorForPurchaseCost(): void + public function testStoresPeriodAsCommaSeparatorForPurchaseCost() { $this->settings->set([ 'default_currency' => 'EUR', @@ -322,7 +322,7 @@ final class StoreAssetTest extends TestCase $this->assertEquals(12.34, $asset->purchase_cost); } - public function testUniqueSerialNumbersIsEnforcedWhenEnabled(): void + public function testUniqueSerialNumbersIsEnforcedWhenEnabled() { $model = AssetModel::factory()->create(); $status = Statuslabel::factory()->create(); @@ -350,7 +350,7 @@ final class StoreAssetTest extends TestCase ->assertStatusMessageIs('error'); } - public function testUniqueSerialNumbersIsNotEnforcedWhenDisabled(): void + public function testUniqueSerialNumbersIsNotEnforcedWhenDisabled() { $model = AssetModel::factory()->create(); $status = Statuslabel::factory()->create(); @@ -378,7 +378,7 @@ final class StoreAssetTest extends TestCase ->assertStatusMessageIs('success'); } - public function testAssetTagsMustBeUniqueWhenUndeleted(): void + public function testAssetTagsMustBeUniqueWhenUndeleted() { $model = AssetModel::factory()->create(); $status = Statuslabel::factory()->create(); @@ -405,7 +405,7 @@ final class StoreAssetTest extends TestCase ->assertStatusMessageIs('error'); } - public function testAssetTagsCanBeDuplicatedIfDeleted(): void + public function testAssetTagsCanBeDuplicatedIfDeleted() { $model = AssetModel::factory()->create(); $status = Statuslabel::factory()->create(); @@ -435,7 +435,7 @@ final class StoreAssetTest extends TestCase ->assertStatusMessageIs('success'); } - public function testAnAssetCanBeCheckedOutToUserOnStore(): void + public function testAnAssetCanBeCheckedOutToUserOnStore() { $model = AssetModel::factory()->create(); $status = Statuslabel::factory()->create(); @@ -461,7 +461,7 @@ final class StoreAssetTest extends TestCase $this->assertTrue($asset->assignedTo->is($userAssigned)); } - public function testAnAssetCanBeCheckedOutToLocationOnStore(): void + public function testAnAssetCanBeCheckedOutToLocationOnStore() { $model = AssetModel::factory()->create(); $status = Statuslabel::factory()->create(); @@ -487,7 +487,7 @@ final class StoreAssetTest extends TestCase $this->assertTrue($asset->location->is($location)); } - public function testAnAssetCanBeCheckedOutToAssetOnStore(): void + public function testAnAssetCanBeCheckedOutToAssetOnStore() { $model = AssetModel::factory()->create(); $status = Statuslabel::factory()->create(); @@ -514,7 +514,7 @@ final class StoreAssetTest extends TestCase $this->assertTrue($asset->assignedAssets()->find($response['payload']['id'])->is($apiAsset)); } - public function testCompanyIdNeedsToBeInteger(): void + public function testCompanyIdNeedsToBeInteger() { $this->actingAsForApi(User::factory()->createAssets()->create()) ->postJson(route('api.assets.store'), [ @@ -526,7 +526,7 @@ final class StoreAssetTest extends TestCase }); } - public function testEncryptedCustomFieldCanBeStored(): void + public function testEncryptedCustomFieldCanBeStored() { $this->markIncompleteIfMySQL('Custom Fields tests do not work on MySQL'); @@ -550,7 +550,7 @@ final class StoreAssetTest extends TestCase $this->assertEquals('This is encrypted field', Crypt::decrypt($asset->{$field->db_column_name()})); } - public function testPermissionNeededToStoreEncryptedField(): void + public function testPermissionNeededToStoreEncryptedField() { // @todo: $this->markTestIncomplete(); diff --git a/tests/Feature/Assets/Api/UpdateAssetTest.php b/tests/Feature/Assets/Api/UpdateAssetTest.php index f964ea1aec..f58c26b051 100644 --- a/tests/Feature/Assets/Api/UpdateAssetTest.php +++ b/tests/Feature/Assets/Api/UpdateAssetTest.php @@ -15,14 +15,14 @@ use Tests\TestCase; final class UpdateAssetTest extends TestCase { - public function testThatANonExistentAssetIdReturnsError(): void + public function testThatANonExistentAssetIdReturnsError() { $this->actingAsForApi(User::factory()->editAssets()->createAssets()->create()) ->patchJson(route('api.assets.update', 123456789)) ->assertStatusMessageIs('error'); } - public function testRequiresPermissionToUpdateAsset(): void + public function testRequiresPermissionToUpdateAsset() { $asset = Asset::factory()->create(); @@ -31,7 +31,7 @@ final class UpdateAssetTest extends TestCase ->assertForbidden(); } - public function testGivenPermissionUpdateAssetIsAllowed(): void + public function testGivenPermissionUpdateAssetIsAllowed() { $asset = Asset::factory()->create(); @@ -43,7 +43,7 @@ final class UpdateAssetTest extends TestCase ->assertOk(); } - public function testAllAssetAttributesAreStored(): void + public function testAllAssetAttributesAreStored() { $asset = Asset::factory()->create(); $user = User::factory()->editAssets()->create(); @@ -103,7 +103,7 @@ final class UpdateAssetTest extends TestCase $this->assertEquals('2023-09-03 00:00:00', $updatedAsset->last_audit_date); } - public function testAssetEolDateIsCalculatedIfPurchaseDateUpdated(): void + public function testAssetEolDateIsCalculatedIfPurchaseDateUpdated() { $asset = Asset::factory()->laptopMbp()->noPurchaseOrEolDate()->create(); @@ -120,7 +120,7 @@ final class UpdateAssetTest extends TestCase $this->assertEquals('2024-01-01', $asset->asset_eol_date); } - public function testAssetEolDateIsNotCalculatedIfPurchaseDateNotSet(): void + public function testAssetEolDateIsNotCalculatedIfPurchaseDateNotSet() { $asset = Asset::factory()->laptopMbp()->noPurchaseOrEolDate()->create(); @@ -138,7 +138,7 @@ final class UpdateAssetTest extends TestCase $this->assertEquals('2022-01-01', $asset->asset_eol_date); } - public function testAssetEolExplicitIsSetIfAssetEolDateIsExplicitlySet(): void + public function testAssetEolExplicitIsSetIfAssetEolDateIsExplicitlySet() { $asset = Asset::factory()->laptopMbp()->create(); @@ -156,7 +156,7 @@ final class UpdateAssetTest extends TestCase $this->assertTrue($asset->eol_explicit); } - public function testAssetTagCannotUpdateToNullValue(): void + public function testAssetTagCannotUpdateToNullValue() { $asset = Asset::factory()->laptopMbp()->create(); @@ -168,7 +168,7 @@ final class UpdateAssetTest extends TestCase ->assertStatusMessageIs('error'); } - public function testAssetTagCannotUpdateToEmptyStringValue(): void + public function testAssetTagCannotUpdateToEmptyStringValue() { $asset = Asset::factory()->laptopMbp()->create(); @@ -180,7 +180,7 @@ final class UpdateAssetTest extends TestCase ->assertStatusMessageIs('error'); } - public function testModelIdCannotUpdateToNullValue(): void + public function testModelIdCannotUpdateToNullValue() { $asset = Asset::factory()->laptopMbp()->create(); @@ -192,7 +192,7 @@ final class UpdateAssetTest extends TestCase ->assertStatusMessageIs('error'); } - public function testModelIdCannotUpdateToEmptyStringValue(): void + public function testModelIdCannotUpdateToEmptyStringValue() { $asset = Asset::factory()->laptopMbp()->create(); @@ -204,7 +204,7 @@ final class UpdateAssetTest extends TestCase ->assertStatusMessageIs('error'); } - public function testStatusIdCannotUpdateToNullValue(): void + public function testStatusIdCannotUpdateToNullValue() { $asset = Asset::factory()->laptopMbp()->create(); @@ -216,7 +216,7 @@ final class UpdateAssetTest extends TestCase ->assertStatusMessageIs('error'); } - public function testStatusIdCannotUpdateToEmptyStringValue(): void + public function testStatusIdCannotUpdateToEmptyStringValue() { $asset = Asset::factory()->laptopMbp()->create(); @@ -228,7 +228,7 @@ final class UpdateAssetTest extends TestCase ->assertStatusMessageIs('error'); } - public function testIfRtdLocationIdIsSetWithoutLocationIdAssetReturnsToDefault(): void + public function testIfRtdLocationIdIsSetWithoutLocationIdAssetReturnsToDefault() { $location = Location::factory()->create(); $asset = Asset::factory()->laptopMbp()->create([ @@ -247,7 +247,7 @@ final class UpdateAssetTest extends TestCase $this->assertTrue($asset->location->is($rtdLocation)); } - public function testIfLocationAndRtdLocationAreSetLocationIdIsLocation(): void + public function testIfLocationAndRtdLocationAreSetLocationIdIsLocation() { $location = Location::factory()->create(); $asset = Asset::factory()->laptopMbp()->create(); @@ -265,7 +265,7 @@ final class UpdateAssetTest extends TestCase $this->assertTrue($asset->location->is($location)); } - public function testEncryptedCustomFieldCanBeUpdated(): void + public function testEncryptedCustomFieldCanBeUpdated() { $this->markIncompleteIfMySQL('Custom Fields tests do not work on MySQL'); @@ -284,7 +284,7 @@ final class UpdateAssetTest extends TestCase $this->assertEquals('This is encrypted field', Crypt::decrypt($asset->{$field->db_column_name()})); } - public function testPermissionNeededToUpdateEncryptedField(): void + public function testPermissionNeededToUpdateEncryptedField() { $this->markIncompleteIfMySQL('Custom Fields tests do not work on MySQL'); @@ -308,7 +308,7 @@ final class UpdateAssetTest extends TestCase $this->assertEquals("encrypted value should not change", Crypt::decrypt($asset->{$field->db_column_name()})); } - public function testCheckoutToUserOnAssetUpdate(): void + public function testCheckoutToUserOnAssetUpdate() { $asset = Asset::factory()->create(); $user = User::factory()->editAssets()->create(); @@ -327,7 +327,7 @@ final class UpdateAssetTest extends TestCase $this->assertEquals($asset->assigned_type, 'App\Models\User'); } - public function testCheckoutToDeletedUserFailsOnAssetUpdate(): void + public function testCheckoutToDeletedUserFailsOnAssetUpdate() { $asset = Asset::factory()->create(); $user = User::factory()->editAssets()->create(); @@ -346,7 +346,7 @@ final class UpdateAssetTest extends TestCase $this->assertNull($asset->assigned_type); } - public function testCheckoutToLocationOnAssetUpdate(): void + public function testCheckoutToLocationOnAssetUpdate() { $asset = Asset::factory()->create(); $user = User::factory()->editAssets()->create(); @@ -366,7 +366,7 @@ final class UpdateAssetTest extends TestCase } - public function testCheckoutToDeletedLocationFailsOnAssetUpdate(): void + public function testCheckoutToDeletedLocationFailsOnAssetUpdate() { $asset = Asset::factory()->create(); $user = User::factory()->editAssets()->create(); @@ -385,7 +385,7 @@ final class UpdateAssetTest extends TestCase $this->assertNull($asset->assigned_type); } - public function testCheckoutAssetOnAssetUpdate(): void + public function testCheckoutAssetOnAssetUpdate() { $asset = Asset::factory()->create(); $user = User::factory()->editAssets()->create(); @@ -406,7 +406,7 @@ final class UpdateAssetTest extends TestCase } - public function testCheckoutToDeletedAssetFailsOnAssetUpdate(): void + public function testCheckoutToDeletedAssetFailsOnAssetUpdate() { $asset = Asset::factory()->create(); $user = User::factory()->editAssets()->create(); @@ -425,7 +425,7 @@ final class UpdateAssetTest extends TestCase $this->assertNull($asset->assigned_type); } - public function testAssetCannotBeUpdatedByUserInSeparateCompany(): void + public function testAssetCannotBeUpdatedByUserInSeparateCompany() { $this->settings->enableMultipleFullCompanySupport(); diff --git a/tests/Feature/Assets/Ui/BulkDeleteAssetsTest.php b/tests/Feature/Assets/Ui/BulkDeleteAssetsTest.php index 3be29e2d58..26478d37fd 100644 --- a/tests/Feature/Assets/Ui/BulkDeleteAssetsTest.php +++ b/tests/Feature/Assets/Ui/BulkDeleteAssetsTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; final class BulkDeleteAssetsTest extends TestCase { - public function testUserWithPermissionsCanAccessPage(): void + public function testUserWithPermissionsCanAccessPage() { $user = User::factory()->viewAssets()->deleteAssets()->editAssets()->create(); $assets = Asset::factory()->count(2)->create(); @@ -25,7 +25,7 @@ final class BulkDeleteAssetsTest extends TestCase ])->assertStatus(200); } - public function testStandardUserCannotAccessPage(): void + public function testStandardUserCannotAccessPage() { $user = User::factory()->create(); $assets = Asset::factory()->count(2)->create(); @@ -38,7 +38,7 @@ final class BulkDeleteAssetsTest extends TestCase ])->assertStatus(403); } - public function testPageRedirectFromInterstitialIfNoAssetsSelectedToDelete(): void + public function testPageRedirectFromInterstitialIfNoAssetsSelectedToDelete() { $user = User::factory()->viewAssets()->deleteAssets()->editAssets()->create(); $response = $this->actingAs($user) @@ -52,7 +52,7 @@ final class BulkDeleteAssetsTest extends TestCase $this->followRedirects($response)->assertSee('alert-danger'); } - public function testPageRedirectFromInterstitialIfNoAssetsSelectedToRestore(): void + public function testPageRedirectFromInterstitialIfNoAssetsSelectedToRestore() { $user = User::factory()->viewAssets()->deleteAssets()->editAssets()->create(); $response = $this->actingAs($user) @@ -68,7 +68,7 @@ final class BulkDeleteAssetsTest extends TestCase } - public function testBulkDeleteSelectedAssetsFromInterstitial(): void + public function testBulkDeleteSelectedAssetsFromInterstitial() { $user = User::factory()->viewAssets()->deleteAssets()->editAssets()->create(); $assets = Asset::factory()->count(2)->create(); @@ -89,7 +89,7 @@ final class BulkDeleteAssetsTest extends TestCase $this->followRedirects($response)->assertSee('alert-success'); } - public function testBulkRestoreSelectedAssetsFromInterstitial(): void + public function testBulkRestoreSelectedAssetsFromInterstitial() { $user = User::factory()->viewAssets()->deleteAssets()->editAssets()->create(); $asset = Asset::factory()->deleted()->create(); @@ -116,7 +116,7 @@ final class BulkDeleteAssetsTest extends TestCase } - public function testActionLogCreatedUponBulkDelete(): void + public function testActionLogCreatedUponBulkDelete() { $user = User::factory()->viewAssets()->deleteAssets()->editAssets()->create(); $asset = Asset::factory()->create(); @@ -139,7 +139,7 @@ final class BulkDeleteAssetsTest extends TestCase ); } - public function testActionLogCreatedUponBulkRestore(): void + public function testActionLogCreatedUponBulkRestore() { $user = User::factory()->viewAssets()->deleteAssets()->editAssets()->create(); $asset = Asset::factory()->deleted()->create(); diff --git a/tests/Feature/Assets/Ui/BulkEditAssetsTest.php b/tests/Feature/Assets/Ui/BulkEditAssetsTest.php index 3596852978..d4253d4c77 100644 --- a/tests/Feature/Assets/Ui/BulkEditAssetsTest.php +++ b/tests/Feature/Assets/Ui/BulkEditAssetsTest.php @@ -14,7 +14,7 @@ use Tests\TestCase; final class BulkEditAssetsTest extends TestCase { - public function testUserWithPermissionsCanAccessPage(): void + public function testUserWithPermissionsCanAccessPage() { $user = User::factory()->viewAssets()->editAssets()->create(); $assets = Asset::factory()->count(2)->create(); @@ -29,7 +29,7 @@ final class BulkEditAssetsTest extends TestCase ])->assertStatus(200); } - public function testStandardUserCannotAccessPage(): void + public function testStandardUserCannotAccessPage() { $user = User::factory()->create(); $assets = Asset::factory()->count(2)->create(); @@ -44,7 +44,7 @@ final class BulkEditAssetsTest extends TestCase ])->assertStatus(403); } - public function testBulkEditAssetsAcceptsAllPossibleAttributes(): void + public function testBulkEditAssetsAcceptsAllPossibleAttributes() { // sets up all needed models and attributes on the assets // this test does not deal with custom fields - will be dealt with in separate cases @@ -109,7 +109,7 @@ final class BulkEditAssetsTest extends TestCase }); } - public function testBulkEditAssetsAcceptsAndUpdatesUnencryptedCustomFields(): void + public function testBulkEditAssetsAcceptsAndUpdatesUnencryptedCustomFields() { $this->markIncompleteIfMySQL('Custom Fields tests do not work on MySQL'); @@ -141,7 +141,7 @@ final class BulkEditAssetsTest extends TestCase }); } - public function testBulkEditAssetsAcceptsAndUpdatesEncryptedCustomFields(): void + public function testBulkEditAssetsAcceptsAndUpdatesEncryptedCustomFields() { $this->markIncompleteIfMySQL('Custom Fields tests do not work on MySQL'); @@ -165,7 +165,7 @@ final class BulkEditAssetsTest extends TestCase }); } - public function testBulkEditAssetsRequiresAdminUserToUpdateEncryptedCustomFields(): void + public function testBulkEditAssetsRequiresAdminUserToUpdateEncryptedCustomFields() { $this->markIncompleteIfMySQL('Custom Fields tests do not work on mysql'); $edit_user = User::factory()->editAssets()->create(); diff --git a/tests/Feature/Assets/Ui/CloneAssetTest.php b/tests/Feature/Assets/Ui/CloneAssetTest.php index ebf7cd6572..7247276005 100644 --- a/tests/Feature/Assets/Ui/CloneAssetTest.php +++ b/tests/Feature/Assets/Ui/CloneAssetTest.php @@ -8,7 +8,7 @@ use Tests\TestCase; final class CloneAssetTest extends TestCase { - public function testPermissionRequiredToCreateAssetModel(): void + public function testPermissionRequiredToCreateAssetModel() { $asset = Asset::factory()->create(); $this->actingAs(User::factory()->create()) @@ -24,7 +24,7 @@ final class CloneAssetTest extends TestCase $response->assertStatus(200); } - public function testAssetCanBeCloned(): void + public function testAssetCanBeCloned() { $asset_to_clone = Asset::factory()->create(['name'=>'Asset to clone']); $this->actingAs(User::factory()->createAssets()->create()) diff --git a/tests/Feature/Assets/Ui/EditAssetTest.php b/tests/Feature/Assets/Ui/EditAssetTest.php index 6561df4722..bb2eb8de4b 100644 --- a/tests/Feature/Assets/Ui/EditAssetTest.php +++ b/tests/Feature/Assets/Ui/EditAssetTest.php @@ -11,7 +11,7 @@ use Tests\TestCase; final class EditAssetTest extends TestCase { - public function testPermissionRequiredToViewLicense(): void + public function testPermissionRequiredToViewLicense() { $asset = Asset::factory()->create(); $this->actingAs(User::factory()->create()) @@ -27,7 +27,7 @@ final class EditAssetTest extends TestCase $response->assertStatus(200); } - public function testAssetEditPostIsRedirectedIfRedirectSelectionIsIndex(): void + public function testAssetEditPostIsRedirectedIfRedirectSelectionIsIndex() { $asset = Asset::factory()->assignedToUser()->create(); @@ -45,7 +45,7 @@ final class EditAssetTest extends TestCase ->assertRedirect(route('hardware.index')); $this->assertDatabaseHas('assets', ['asset_tag' => 'New Asset Tag']); } - public function testAssetEditPostIsRedirectedIfRedirectSelectionIsItem(): void + public function testAssetEditPostIsRedirectedIfRedirectSelectionIsItem() { $asset = Asset::factory()->create(); diff --git a/tests/Feature/Categories/Api/CreateCategoriesTest.php b/tests/Feature/Categories/Api/CreateCategoriesTest.php index f5c0d6ac69..8c9b47992b 100644 --- a/tests/Feature/Categories/Api/CreateCategoriesTest.php +++ b/tests/Feature/Categories/Api/CreateCategoriesTest.php @@ -13,14 +13,14 @@ final class CreateCategoriesTest extends TestCase { - public function testRequiresPermissionToCreateCategory(): void + public function testRequiresPermissionToCreateCategory() { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.categories.store')) ->assertForbidden(); } - public function testCanCreateCategoryWithValidCategoryType(): void + public function testCanCreateCategoryWithValidCategoryType() { $response = $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.categories.store'), [ @@ -41,7 +41,7 @@ final class CreateCategoriesTest extends TestCase $this->assertEquals('accessory', $category->category_type); } - public function testCannotCreateCategoryWithoutCategoryType(): void + public function testCannotCreateCategoryWithoutCategoryType() { $response = $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.categories.store'), [ @@ -59,7 +59,7 @@ final class CreateCategoriesTest extends TestCase } - public function testCannotCreateCategoryWithInvalidCategoryType(): void + public function testCannotCreateCategoryWithInvalidCategoryType() { $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.categories.store'), [ diff --git a/tests/Feature/Categories/Api/IndexCategoriesTest.php b/tests/Feature/Categories/Api/IndexCategoriesTest.php index a763dbbec3..139ec12067 100644 --- a/tests/Feature/Categories/Api/IndexCategoriesTest.php +++ b/tests/Feature/Categories/Api/IndexCategoriesTest.php @@ -10,14 +10,14 @@ use Tests\TestCase; final class IndexCategoriesTest extends TestCase { - public function testViewingCategoryIndexRequiresPermission(): void + public function testViewingCategoryIndexRequiresPermission() { $this->actingAsForApi(User::factory()->create()) ->getJson(route('api.departments.index')) ->assertForbidden(); } - public function testCategoryIndexReturnsExpectedSearchResults(): void + public function testCategoryIndexReturnsExpectedSearchResults() { Category::factory()->count(10)->create(); Category::factory()->count(1)->forAssets()->create(['name' => 'My Test Category']); @@ -43,7 +43,7 @@ final class IndexCategoriesTest extends TestCase } - public function testCategoryIndexReturnsExpectedCategories(): void + public function testCategoryIndexReturnsExpectedCategories() { $this->markTestIncomplete('Not sure why the category factory is generating one more than expected here.'); Category::factory()->count(3)->create(); diff --git a/tests/Feature/Categories/Api/UpdateCategoriesTest.php b/tests/Feature/Categories/Api/UpdateCategoriesTest.php index 6b3bd76add..8a8923930b 100644 --- a/tests/Feature/Categories/Api/UpdateCategoriesTest.php +++ b/tests/Feature/Categories/Api/UpdateCategoriesTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class UpdateCategoriesTest extends TestCase { - public function testCanUpdateCategoryViaPatchWithoutCategoryType(): void + public function testCanUpdateCategoryViaPatchWithoutCategoryType() { $category = Category::factory()->create(); @@ -30,7 +30,7 @@ final class UpdateCategoriesTest extends TestCase } - public function testCannotUpdateCategoryViaPatchWithCategoryType(): void + public function testCannotUpdateCategoryViaPatchWithCategoryType() { $category = Category::factory()->create(); diff --git a/tests/Feature/Categories/Ui/CreateCategoriesTest.php b/tests/Feature/Categories/Ui/CreateCategoriesTest.php index 5deffbe206..4471c7647c 100644 --- a/tests/Feature/Categories/Ui/CreateCategoriesTest.php +++ b/tests/Feature/Categories/Ui/CreateCategoriesTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class CreateCategoriesTest extends TestCase { - public function testPermissionRequiredToCreateCategories(): void + public function testPermissionRequiredToCreateCategories() { $this->actingAs(User::factory()->create()) ->post(route('categories.store'), [ @@ -19,7 +19,7 @@ final class CreateCategoriesTest extends TestCase ->assertForbidden(); } - public function testUserCanCreateCategories(): void + public function testUserCanCreateCategories() { $this->assertFalse(Category::where('name', 'Test Category')->exists()); @@ -33,7 +33,7 @@ final class CreateCategoriesTest extends TestCase $this->assertTrue(Category::where('name', 'Test Category')->exists()); } - public function testUserCannotCreateCategoriesWithInvalidType(): void + public function testUserCannotCreateCategoriesWithInvalidType() { $this->assertFalse(Category::where('name', 'Test Category')->exists()); diff --git a/tests/Feature/Categories/Ui/IndexCategoriesTest.php b/tests/Feature/Categories/Ui/IndexCategoriesTest.php index 571e401b81..7f740f3328 100644 --- a/tests/Feature/Categories/Ui/IndexCategoriesTest.php +++ b/tests/Feature/Categories/Ui/IndexCategoriesTest.php @@ -7,14 +7,14 @@ use Tests\TestCase; final class IndexCategoriesTest extends TestCase { - public function testPermissionRequiredToViewCategoryList(): void + public function testPermissionRequiredToViewCategoryList() { $this->actingAs(User::factory()->create()) ->get(route('categories.index')) ->assertForbidden(); } - public function testUserCanListCategories(): void + public function testUserCanListCategories() { $this->actingAs(User::factory()->superuser()->create()) ->get(route('categories.index')) diff --git a/tests/Feature/Categories/Ui/UpdateCategoriesTest.php b/tests/Feature/Categories/Ui/UpdateCategoriesTest.php index 45e02a0a64..fd2e474462 100644 --- a/tests/Feature/Categories/Ui/UpdateCategoriesTest.php +++ b/tests/Feature/Categories/Ui/UpdateCategoriesTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class UpdateCategoriesTest extends TestCase { - public function testPermissionRequiredToStoreCategory(): void + public function testPermissionRequiredToStoreCategory() { $this->actingAs(User::factory()->create()) ->post(route('categories.store'), [ @@ -20,7 +20,7 @@ final class UpdateCategoriesTest extends TestCase ->assertForbidden(); } - public function testUserCanCreateCategories(): void + public function testUserCanCreateCategories() { $this->actingAs(User::factory()->superuser()->create()) ->post(route('categories.store'), [ @@ -34,7 +34,7 @@ final class UpdateCategoriesTest extends TestCase $this->assertTrue(Category::where('name', 'Test Category')->exists()); } - public function testUserCanEditAssetCategory(): void + public function testUserCanEditAssetCategory() { $category = Category::factory()->forAssets()->create(['name' => 'Test Category']); $this->assertTrue(Category::where('name', 'Test Category')->exists()); @@ -52,7 +52,7 @@ final class UpdateCategoriesTest extends TestCase } - public function testUserCanChangeCategoryTypeIfNoAssetsAssociated(): void + public function testUserCanChangeCategoryTypeIfNoAssetsAssociated() { $category = Category::factory()->forAssets()->create(['name' => 'Test Category']); $this->assertTrue(Category::where('name', 'Test Category')->exists()); @@ -72,7 +72,7 @@ final class UpdateCategoriesTest extends TestCase } - public function testUserCannotChangeCategoryTypeIfAssetsAreAssociated(): void + public function testUserCannotChangeCategoryTypeIfAssetsAreAssociated() { Asset::factory()->count(5)->laptopMbp()->create(); $category = Category::where('name', 'Laptops')->first(); diff --git a/tests/Feature/Checkins/Api/AssetCheckinTest.php b/tests/Feature/Checkins/Api/AssetCheckinTest.php index 1891a9d282..42f6834217 100644 --- a/tests/Feature/Checkins/Api/AssetCheckinTest.php +++ b/tests/Feature/Checkins/Api/AssetCheckinTest.php @@ -15,28 +15,28 @@ use Tests\TestCase; final class AssetCheckinTest extends TestCase { - public function testCheckingInAssetRequiresCorrectPermission(): void + public function testCheckingInAssetRequiresCorrectPermission() { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.asset.checkin', Asset::factory()->assignedToUser()->create())) ->assertForbidden(); } - public function testCannotCheckInNonExistentAsset(): void + public function testCannotCheckInNonExistentAsset() { $this->actingAsForApi(User::factory()->checkinAssets()->create()) ->postJson(route('api.asset.checkin', ['id' => 'does-not-exist'])) ->assertStatusMessageIs('error'); } - public function testCannotCheckInAssetThatIsNotCheckedOut(): void + public function testCannotCheckInAssetThatIsNotCheckedOut() { $this->actingAsForApi(User::factory()->checkinAssets()->create()) ->postJson(route('api.asset.checkin', Asset::factory()->create()->id)) ->assertStatusMessageIs('error'); } - public function testAssetCanBeCheckedIn(): void + public function testAssetCanBeCheckedIn() { Event::fake([CheckoutableCheckedIn::class]); @@ -76,7 +76,7 @@ final class AssetCheckinTest extends TestCase }, 1); } - public function testLocationIsSetToRTDLocationByDefaultUponCheckin(): void + public function testLocationIsSetToRTDLocationByDefaultUponCheckin() { $rtdLocation = Location::factory()->create(); $asset = Asset::factory()->assignedToUser()->create([ @@ -90,7 +90,7 @@ final class AssetCheckinTest extends TestCase $this->assertTrue($asset->refresh()->location()->is($rtdLocation)); } - public function testDefaultLocationCanBeUpdatedUponCheckin(): void + public function testDefaultLocationCanBeUpdatedUponCheckin() { $location = Location::factory()->create(); $asset = Asset::factory()->assignedToUser()->create(); @@ -104,7 +104,7 @@ final class AssetCheckinTest extends TestCase $this->assertTrue($asset->refresh()->defaultLoc()->is($location)); } - public function testAssetsLicenseSeatsAreClearedUponCheckin(): void + public function testAssetsLicenseSeatsAreClearedUponCheckin() { $asset = Asset::factory()->assignedToUser()->create(); LicenseSeat::factory()->assignedToUser()->for($asset)->create(); @@ -117,7 +117,7 @@ final class AssetCheckinTest extends TestCase $this->assertNull($asset->refresh()->licenseseats->first()->assigned_to); } - public function testLegacyLocationValuesSetToZeroAreUpdated(): void + public function testLegacyLocationValuesSetToZeroAreUpdated() { $asset = Asset::factory()->canBeInvalidUponCreation()->assignedToUser()->create([ 'rtd_location_id' => 0, @@ -131,7 +131,7 @@ final class AssetCheckinTest extends TestCase $this->assertEquals($asset->location_id, $asset->rtd_location_id); } - public function testPendingCheckoutAcceptancesAreClearedUponCheckin(): void + public function testPendingCheckoutAcceptancesAreClearedUponCheckin() { $asset = Asset::factory()->assignedToUser()->create(); @@ -143,7 +143,7 @@ final class AssetCheckinTest extends TestCase $this->assertFalse($acceptance->exists(), 'Acceptance was not deleted'); } - public function testCheckinTimeAndActionLogNoteCanBeSet(): void + public function testCheckinTimeAndActionLogNoteCanBeSet() { Event::fake(); diff --git a/tests/Feature/Checkins/Ui/AccessoryCheckinTest.php b/tests/Feature/Checkins/Ui/AccessoryCheckinTest.php index 0eb63b4781..9084275d98 100644 --- a/tests/Feature/Checkins/Ui/AccessoryCheckinTest.php +++ b/tests/Feature/Checkins/Ui/AccessoryCheckinTest.php @@ -12,7 +12,7 @@ use Tests\TestCase; final class AccessoryCheckinTest extends TestCase { - public function testCheckingInAccessoryRequiresCorrectPermission(): void + public function testCheckingInAccessoryRequiresCorrectPermission() { $accessory = Accessory::factory()->checkedOutToUser()->create(); @@ -21,7 +21,7 @@ final class AccessoryCheckinTest extends TestCase ->assertForbidden(); } - public function testAccessoryCanBeCheckedIn(): void + public function testAccessoryCanBeCheckedIn() { Event::fake([CheckoutableCheckedIn::class]); @@ -38,7 +38,7 @@ final class AccessoryCheckinTest extends TestCase Event::assertDispatched(CheckoutableCheckedIn::class, 1); } - public function testEmailSentToUserIfSettingEnabled(): void + public function testEmailSentToUserIfSettingEnabled() { Notification::fake(); @@ -62,7 +62,7 @@ final class AccessoryCheckinTest extends TestCase ); } - public function testEmailNotSentToUserIfSettingDisabled(): void + public function testEmailNotSentToUserIfSettingDisabled() { Notification::fake(); diff --git a/tests/Feature/Checkins/Ui/AssetCheckinTest.php b/tests/Feature/Checkins/Ui/AssetCheckinTest.php index fde1071296..1f6c20903a 100644 --- a/tests/Feature/Checkins/Ui/AssetCheckinTest.php +++ b/tests/Feature/Checkins/Ui/AssetCheckinTest.php @@ -15,7 +15,7 @@ use Tests\TestCase; final class AssetCheckinTest extends TestCase { - public function testCheckingInAssetRequiresCorrectPermission(): void + public function testCheckingInAssetRequiresCorrectPermission() { $this->actingAs(User::factory()->create()) ->post(route('hardware.checkin.store', [ @@ -24,7 +24,7 @@ final class AssetCheckinTest extends TestCase ->assertForbidden(); } - public function testCannotCheckInAssetThatIsNotCheckedOut(): void + public function testCannotCheckInAssetThatIsNotCheckedOut() { $this->actingAs(User::factory()->checkinAssets()->create()) ->post(route('hardware.checkin.store', ['assetId' => Asset::factory()->create()->id])) @@ -33,7 +33,7 @@ final class AssetCheckinTest extends TestCase ->assertRedirect(route('hardware.index')); } - public function testCannotStoreAssetCheckinThatIsNotCheckedOut(): void + public function testCannotStoreAssetCheckinThatIsNotCheckedOut() { $this->actingAs(User::factory()->checkinAssets()->create()) ->get(route('hardware.checkin.store', ['assetId' => Asset::factory()->create()->id])) @@ -42,7 +42,7 @@ final class AssetCheckinTest extends TestCase ->assertRedirect(route('hardware.index')); } - public function testAssetCanBeCheckedIn(): void + public function testAssetCanBeCheckedIn() { Event::fake([CheckoutableCheckedIn::class]); @@ -85,7 +85,7 @@ final class AssetCheckinTest extends TestCase }, 1); } - public function testLocationIsSetToRTDLocationByDefaultUponCheckin(): void + public function testLocationIsSetToRTDLocationByDefaultUponCheckin() { $rtdLocation = Location::factory()->create(); $asset = Asset::factory()->assignedToUser()->create([ @@ -99,7 +99,7 @@ final class AssetCheckinTest extends TestCase $this->assertTrue($asset->refresh()->location()->is($rtdLocation)); } - public function testDefaultLocationCanBeUpdatedUponCheckin(): void + public function testDefaultLocationCanBeUpdatedUponCheckin() { $location = Location::factory()->create(); $asset = Asset::factory()->assignedToUser()->create(); @@ -113,7 +113,7 @@ final class AssetCheckinTest extends TestCase $this->assertTrue($asset->refresh()->defaultLoc()->is($location)); } - public function testAssetsLicenseSeatsAreClearedUponCheckin(): void + public function testAssetsLicenseSeatsAreClearedUponCheckin() { $asset = Asset::factory()->assignedToUser()->create(); LicenseSeat::factory()->assignedToUser()->for($asset)->create(); @@ -126,7 +126,7 @@ final class AssetCheckinTest extends TestCase $this->assertNull($asset->refresh()->licenseseats->first()->assigned_to); } - public function testLegacyLocationValuesSetToZeroAreUpdated(): void + public function testLegacyLocationValuesSetToZeroAreUpdated() { $asset = Asset::factory()->canBeInvalidUponCreation()->assignedToUser()->create([ 'rtd_location_id' => 0, @@ -140,7 +140,7 @@ final class AssetCheckinTest extends TestCase $this->assertEquals($asset->location_id, $asset->rtd_location_id); } - public function testPendingCheckoutAcceptancesAreClearedUponCheckin(): void + public function testPendingCheckoutAcceptancesAreClearedUponCheckin() { $asset = Asset::factory()->assignedToUser()->create(); @@ -152,7 +152,7 @@ final class AssetCheckinTest extends TestCase $this->assertFalse($acceptance->exists(), 'Acceptance was not deleted'); } - public function testCheckinTimeAndActionLogNoteCanBeSet(): void + public function testCheckinTimeAndActionLogNoteCanBeSet() { Event::fake([CheckoutableCheckedIn::class]); @@ -170,7 +170,7 @@ final class AssetCheckinTest extends TestCase }, 1); } - public function testAssetCheckinPageIsRedirectedIfModelIsInvalid(): void + public function testAssetCheckinPageIsRedirectedIfModelIsInvalid() { $asset = Asset::factory()->assignedToUser()->create(); @@ -184,7 +184,7 @@ final class AssetCheckinTest extends TestCase ->assertRedirect(route('hardware.show',['hardware' => $asset->id])); } - public function testAssetCheckinPagePostIsRedirectedIfModelIsInvalid(): void + public function testAssetCheckinPagePostIsRedirectedIfModelIsInvalid() { $asset = Asset::factory()->assignedToUser()->create(); $asset->model_id = 0; @@ -197,7 +197,7 @@ final class AssetCheckinTest extends TestCase ->assertRedirect(route('hardware.show', ['hardware' => $asset->id])); } - public function testAssetCheckinPagePostIsRedirectedIfRedirectSelectionIsIndex(): void + public function testAssetCheckinPagePostIsRedirectedIfRedirectSelectionIsIndex() { $asset = Asset::factory()->assignedToUser()->create(); @@ -210,7 +210,7 @@ final class AssetCheckinTest extends TestCase ->assertRedirect(route('hardware.index')); } - public function testAssetCheckinPagePostIsRedirectedIfRedirectSelectionIsItem(): void + public function testAssetCheckinPagePostIsRedirectedIfRedirectSelectionIsItem() { $asset = Asset::factory()->assignedToUser()->create(); diff --git a/tests/Feature/Checkins/Ui/ComponentCheckinTest.php b/tests/Feature/Checkins/Ui/ComponentCheckinTest.php index a665d13ff2..721c00bf93 100644 --- a/tests/Feature/Checkins/Ui/ComponentCheckinTest.php +++ b/tests/Feature/Checkins/Ui/ComponentCheckinTest.php @@ -8,7 +8,7 @@ use Tests\TestCase; final class ComponentCheckinTest extends TestCase { - public function testCheckingInComponentRequiresCorrectPermission(): void + public function testCheckingInComponentRequiresCorrectPermission() { $this->actingAs(User::factory()->create()) ->post(route('components.checkin.store', [ @@ -18,7 +18,7 @@ final class ComponentCheckinTest extends TestCase } - public function testComponentCheckinPagePostIsRedirectedIfRedirectSelectionIsIndex(): void + public function testComponentCheckinPagePostIsRedirectedIfRedirectSelectionIsIndex() { $component = Component::factory()->checkedOutToAsset()->create(); @@ -32,7 +32,7 @@ final class ComponentCheckinTest extends TestCase ->assertRedirect(route('components.index')); } - public function testComponentCheckinPagePostIsRedirectedIfRedirectSelectionIsItem(): void + public function testComponentCheckinPagePostIsRedirectedIfRedirectSelectionIsItem() { $component = Component::factory()->checkedOutToAsset()->create(); diff --git a/tests/Feature/Checkins/Ui/LicenseCheckinTest.php b/tests/Feature/Checkins/Ui/LicenseCheckinTest.php index 248663860b..4d93114e0f 100644 --- a/tests/Feature/Checkins/Ui/LicenseCheckinTest.php +++ b/tests/Feature/Checkins/Ui/LicenseCheckinTest.php @@ -8,7 +8,7 @@ use Tests\TestCase; final class LicenseCheckinTest extends TestCase { - public function testCheckingInLicenseRequiresCorrectPermission(): void + public function testCheckingInLicenseRequiresCorrectPermission() { $this->actingAs(User::factory()->create()) ->post(route('licenses.checkin.save', [ diff --git a/tests/Feature/CheckoutAcceptances/Ui/AccessoryAcceptanceTest.php b/tests/Feature/CheckoutAcceptances/Ui/AccessoryAcceptanceTest.php index de7c0af6cb..99686d898d 100644 --- a/tests/Feature/CheckoutAcceptances/Ui/AccessoryAcceptanceTest.php +++ b/tests/Feature/CheckoutAcceptances/Ui/AccessoryAcceptanceTest.php @@ -16,7 +16,7 @@ final class AccessoryAcceptanceTest extends TestCase /** * This can be absorbed into a bigger test */ - public function testUsersNameIsIncludedInAccessoryAcceptedNotification(): void + public function testUsersNameIsIncludedInAccessoryAcceptedNotification() { Notification::fake(); @@ -49,7 +49,7 @@ final class AccessoryAcceptanceTest extends TestCase /** * This can be absorbed into a bigger test */ - public function testUsersNameIsIncludedInAccessoryDeclinedNotification(): void + public function testUsersNameIsIncludedInAccessoryDeclinedNotification() { Notification::fake(); @@ -79,7 +79,7 @@ final class AccessoryAcceptanceTest extends TestCase ); } - public function testUserIsNotAbleToAcceptAnAssetAssignedToADifferentUser(): void + public function testUserIsNotAbleToAcceptAnAssetAssignedToADifferentUser() { Notification::fake(); diff --git a/tests/Feature/Checkouts/Api/AccessoryCheckoutTest.php b/tests/Feature/Checkouts/Api/AccessoryCheckoutTest.php index 45c119de8e..bbebae56b0 100644 --- a/tests/Feature/Checkouts/Api/AccessoryCheckoutTest.php +++ b/tests/Feature/Checkouts/Api/AccessoryCheckoutTest.php @@ -11,14 +11,14 @@ use Tests\TestCase; final class AccessoryCheckoutTest extends TestCase { - public function testCheckingOutAccessoryRequiresCorrectPermission(): void + public function testCheckingOutAccessoryRequiresCorrectPermission() { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.accessories.checkout', Accessory::factory()->create())) ->assertForbidden(); } - public function testValidationWhenCheckingOutAccessory(): void + public function testValidationWhenCheckingOutAccessory() { $this->actingAsForApi(User::factory()->checkoutAccessories()->create()) ->postJson(route('api.accessories.checkout', Accessory::factory()->create()), [ @@ -27,7 +27,7 @@ final class AccessoryCheckoutTest extends TestCase ->assertStatusMessageIs('error'); } - public function testAccessoryMustBeAvailableWhenCheckingOut(): void + public function testAccessoryMustBeAvailableWhenCheckingOut() { $this->actingAsForApi(User::factory()->checkoutAccessories()->create()) ->postJson(route('api.accessories.checkout', Accessory::factory()->withoutItemsRemaining()->create()), [ @@ -58,7 +58,7 @@ final class AccessoryCheckoutTest extends TestCase ->json(); } - public function testAccessoryCanBeCheckedOutWithoutQty(): void + public function testAccessoryCanBeCheckedOutWithoutQty() { $accessory = Accessory::factory()->create(); $user = User::factory()->create(); @@ -90,7 +90,7 @@ final class AccessoryCheckoutTest extends TestCase ); } - public function testAccessoryCanBeCheckedOutWithQty(): void + public function testAccessoryCanBeCheckedOutWithQty() { $accessory = Accessory::factory()->create(['qty' => 20]); $user = User::factory()->create(); @@ -124,7 +124,7 @@ final class AccessoryCheckoutTest extends TestCase ); } - public function testAccessoryCannotBeCheckedOutToInvalidUser(): void + public function testAccessoryCannotBeCheckedOutToInvalidUser() { $accessory = Accessory::factory()->create(); $user = User::factory()->create(); @@ -143,7 +143,7 @@ final class AccessoryCheckoutTest extends TestCase $this->assertFalse($accessory->checkouts()->where('assigned_type', User::class)->where('assigned_to', $user->id)->count() > 0); } - public function testUserSentNotificationUponCheckout(): void + public function testUserSentNotificationUponCheckout() { Notification::fake(); @@ -159,7 +159,7 @@ final class AccessoryCheckoutTest extends TestCase Notification::assertSentTo($user, CheckoutAccessoryNotification::class); } - public function testActionLogCreatedUponCheckout(): void + public function testActionLogCreatedUponCheckout() { $accessory = Accessory::factory()->create(); $actor = User::factory()->checkoutAccessories()->create(); diff --git a/tests/Feature/Checkouts/Api/AssetCheckoutTest.php b/tests/Feature/Checkouts/Api/AssetCheckoutTest.php index 3ea610d01d..8f8d1a9c74 100644 --- a/tests/Feature/Checkouts/Api/AssetCheckoutTest.php +++ b/tests/Feature/Checkouts/Api/AssetCheckoutTest.php @@ -21,7 +21,7 @@ final class AssetCheckoutTest extends TestCase Event::fake([CheckoutableCheckedOut::class]); } - public function testCheckingOutAssetRequiresCorrectPermission(): void + public function testCheckingOutAssetRequiresCorrectPermission() { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.asset.checkout', Asset::factory()->create()), [ @@ -31,7 +31,7 @@ final class AssetCheckoutTest extends TestCase ->assertForbidden(); } - public function testNonExistentAssetCannotBeCheckedOut(): void + public function testNonExistentAssetCannotBeCheckedOut() { $this->actingAsForApi(User::factory()->checkoutAssets()->create()) ->postJson(route('api.asset.checkout', 1000), [ @@ -41,7 +41,7 @@ final class AssetCheckoutTest extends TestCase ->assertStatusMessageIs('error'); } - public function testAssetNotAvailableForCheckoutCannotBeCheckedOut(): void + public function testAssetNotAvailableForCheckoutCannotBeCheckedOut() { $assetAlreadyCheckedOut = Asset::factory()->assignedToUser()->create(); @@ -53,7 +53,7 @@ final class AssetCheckoutTest extends TestCase ->assertStatusMessageIs('error'); } - public function testAssetCannotBeCheckedOutToItself(): void + public function testAssetCannotBeCheckedOutToItself() { $asset = Asset::factory()->create(); @@ -65,7 +65,7 @@ final class AssetCheckoutTest extends TestCase ->assertStatusMessageIs('error'); } - public function testValidationWhenCheckingOutAsset(): void + public function testValidationWhenCheckingOutAsset() { $this->actingAsForApi(User::factory()->checkoutAssets()->create()) ->postJson(route('api.asset.checkout', Asset::factory()->create()), []) @@ -74,7 +74,7 @@ final class AssetCheckoutTest extends TestCase Event::assertNotDispatched(CheckoutableCheckedOut::class); } - public function testCannotCheckoutAcrossCompaniesWhenFullCompanySupportEnabled(): void + public function testCannotCheckoutAcrossCompaniesWhenFullCompanySupportEnabled() { $this->markTestIncomplete('This is not implemented'); } @@ -150,7 +150,7 @@ final class AssetCheckoutTest extends TestCase } #[DataProvider('checkoutTargets')] - public function testAssetCanBeCheckedOut($data): void + public function testAssetCanBeCheckedOut($data) { ['checkout_type' => $type, 'target' => $target, 'expected_location' => $expectedLocation] = $data(); @@ -192,12 +192,12 @@ final class AssetCheckoutTest extends TestCase }); } - public function testLicenseSeatsAreAssignedToUserUponCheckout(): void + public function testLicenseSeatsAreAssignedToUserUponCheckout() { $this->markTestIncomplete('This is not implemented'); } - public function testLastCheckoutUsesCurrentDateIfNotProvided(): void + public function testLastCheckoutUsesCurrentDateIfNotProvided() { $asset = Asset::factory()->create(['last_checkout' => now()->subMonth()]); diff --git a/tests/Feature/Checkouts/Api/ConsumableCheckoutTest.php b/tests/Feature/Checkouts/Api/ConsumableCheckoutTest.php index 398f618239..915fba056e 100644 --- a/tests/Feature/Checkouts/Api/ConsumableCheckoutTest.php +++ b/tests/Feature/Checkouts/Api/ConsumableCheckoutTest.php @@ -11,14 +11,14 @@ use Tests\TestCase; final class ConsumableCheckoutTest extends TestCase { - public function testCheckingOutConsumableRequiresCorrectPermission(): void + public function testCheckingOutConsumableRequiresCorrectPermission() { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.consumables.checkout', Consumable::factory()->create())) ->assertForbidden(); } - public function testValidationWhenCheckingOutConsumable(): void + public function testValidationWhenCheckingOutConsumable() { $this->actingAsForApi(User::factory()->checkoutConsumables()->create()) ->postJson(route('api.consumables.checkout', Consumable::factory()->create()), [ @@ -27,7 +27,7 @@ final class ConsumableCheckoutTest extends TestCase ->assertStatusMessageIs('error'); } - public function testConsumableMustBeAvailableWhenCheckingOut(): void + public function testConsumableMustBeAvailableWhenCheckingOut() { $this->actingAsForApi(User::factory()->checkoutConsumables()->create()) ->postJson(route('api.consumables.checkout', Consumable::factory()->withoutItemsRemaining()->create()), [ @@ -36,7 +36,7 @@ final class ConsumableCheckoutTest extends TestCase ->assertStatusMessageIs('error'); } - public function testConsumableCanBeCheckedOut(): void + public function testConsumableCanBeCheckedOut() { $consumable = Consumable::factory()->create(); $user = User::factory()->create(); @@ -49,7 +49,7 @@ final class ConsumableCheckoutTest extends TestCase $this->assertTrue($user->consumables->contains($consumable)); } - public function testUserSentNotificationUponCheckout(): void + public function testUserSentNotificationUponCheckout() { Notification::fake(); @@ -65,7 +65,7 @@ final class ConsumableCheckoutTest extends TestCase Notification::assertSentTo($user, CheckoutConsumableNotification::class); } - public function testActionLogCreatedUponCheckout(): void + public function testActionLogCreatedUponCheckout() {$consumable = Consumable::factory()->create(); $actor = User::factory()->checkoutConsumables()->create(); $user = User::factory()->create(); diff --git a/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php b/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php index 47e057fdfd..222802079f 100644 --- a/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php @@ -13,14 +13,14 @@ use Tests\TestCase; final class AccessoryCheckoutTest extends TestCase { - public function testCheckingOutAccessoryRequiresCorrectPermission(): void + public function testCheckingOutAccessoryRequiresCorrectPermission() { $this->actingAs(User::factory()->create()) ->post(route('accessories.checkout.store', Accessory::factory()->create())) ->assertForbidden(); } - public function testValidationWhenCheckingOutAccessory(): void + public function testValidationWhenCheckingOutAccessory() { $accessory = Accessory::factory()->create(); $response = $this->actingAs(User::factory()->superuser()->create()) @@ -35,7 +35,7 @@ final class AccessoryCheckoutTest extends TestCase $this->followRedirects($response)->assertSee(trans('general.error')); } - public function testAccessoryMustHaveAvailableItemsForCheckoutWhenCheckingOut(): void + public function testAccessoryMustHaveAvailableItemsForCheckoutWhenCheckingOut() { $accessory = Accessory::factory()->withoutItemsRemaining()->create(); @@ -52,7 +52,7 @@ final class AccessoryCheckoutTest extends TestCase $this->followRedirects($response)->assertSee(trans('general.error')); } - public function testAccessoryCanBeCheckedOutWithoutQuantity(): void + public function testAccessoryCanBeCheckedOutWithoutQuantity() { $accessory = Accessory::factory()->create(); $user = User::factory()->create(); @@ -76,7 +76,7 @@ final class AccessoryCheckoutTest extends TestCase ]); } - public function testAccessoryCanBeCheckedOutWithQuantity(): void + public function testAccessoryCanBeCheckedOutWithQuantity() { $accessory = Accessory::factory()->create(['qty'=>5]); $user = User::factory()->create(); @@ -102,7 +102,7 @@ final class AccessoryCheckoutTest extends TestCase ]); } - public function testAccessoryCanBeCheckedOutToLocationWithQuantity(): void + public function testAccessoryCanBeCheckedOutToLocationWithQuantity() { $accessory = Accessory::factory()->create(['qty'=>5]); $location = Location::factory()->create(); @@ -128,7 +128,7 @@ final class AccessoryCheckoutTest extends TestCase ]); } - public function testAccessoryCanBeCheckedOutToAssetWithQuantity(): void + public function testAccessoryCanBeCheckedOutToAssetWithQuantity() { $accessory = Accessory::factory()->create(['qty'=>5]); $asset = Asset::factory()->create(); @@ -154,7 +154,7 @@ final class AccessoryCheckoutTest extends TestCase ]); } - public function testUserSentNotificationUponCheckout(): void + public function testUserSentNotificationUponCheckout() { Notification::fake(); @@ -171,7 +171,7 @@ final class AccessoryCheckoutTest extends TestCase Notification::assertSentTo($user, CheckoutAccessoryNotification::class); } - public function testActionLogCreatedUponCheckout(): void + public function testActionLogCreatedUponCheckout() { $accessory = Accessory::factory()->create(); $actor = User::factory()->checkoutAccessories()->create(); @@ -200,7 +200,7 @@ final class AccessoryCheckoutTest extends TestCase ); } - public function testAccessoryCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex(): void + public function testAccessoryCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex() { $accessory = Accessory::factory()->create(); @@ -216,7 +216,7 @@ final class AccessoryCheckoutTest extends TestCase ->assertRedirect(route('accessories.index')); } - public function testAccessoryCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem(): void + public function testAccessoryCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem() { $accessory = Accessory::factory()->create(); @@ -233,7 +233,7 @@ final class AccessoryCheckoutTest extends TestCase ->assertRedirect(route('accessories.show', ['accessory' => $accessory->id])); } - public function testAccessoryCheckoutPagePostIsRedirectedIfRedirectSelectionIsTarget(): void + public function testAccessoryCheckoutPagePostIsRedirectedIfRedirectSelectionIsTarget() { $user = User::factory()->create(); $accessory = Accessory::factory()->create(); diff --git a/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php b/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php index 64ddd30cf7..21be6e35b8 100644 --- a/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php @@ -24,7 +24,7 @@ final class AssetCheckoutTest extends TestCase Event::fake([CheckoutableCheckedOut::class]); } - public function testCheckingOutAssetRequiresCorrectPermission(): void + public function testCheckingOutAssetRequiresCorrectPermission() { $this->actingAs(User::factory()->create()) ->post(route('hardware.checkout.store', Asset::factory()->create()), [ @@ -34,7 +34,7 @@ final class AssetCheckoutTest extends TestCase ->assertForbidden(); } - public function testNonExistentAssetCannotBeCheckedOut(): void + public function testNonExistentAssetCannotBeCheckedOut() { $this->actingAs(User::factory()->checkoutAssets()->create()) ->post(route('hardware.checkout.store', 1000), [ @@ -48,7 +48,7 @@ final class AssetCheckoutTest extends TestCase Event::assertNotDispatched(CheckoutableCheckedOut::class); } - public function testAssetNotAvailableForCheckoutCannotBeCheckedOut(): void + public function testAssetNotAvailableForCheckoutCannotBeCheckedOut() { $assetAlreadyCheckedOut = Asset::factory()->assignedToUser()->create(); @@ -63,7 +63,7 @@ final class AssetCheckoutTest extends TestCase Event::assertNotDispatched(CheckoutableCheckedOut::class); } - public function testAssetCannotBeCheckedOutToItself(): void + public function testAssetCannotBeCheckedOutToItself() { $asset = Asset::factory()->create(); @@ -77,7 +77,7 @@ final class AssetCheckoutTest extends TestCase Event::assertNotDispatched(CheckoutableCheckedOut::class); } - public function testValidationWhenCheckingOutAsset(): void + public function testValidationWhenCheckingOutAsset() { $this->actingAs(User::factory()->create()) ->post(route('hardware.checkout.store', Asset::factory()->create()), [ @@ -98,7 +98,7 @@ final class AssetCheckoutTest extends TestCase Event::assertNotDispatched(CheckoutableCheckedOut::class); } - public function testCannotCheckoutAcrossCompaniesWhenFullCompanySupportEnabled(): void + public function testCannotCheckoutAcrossCompaniesWhenFullCompanySupportEnabled() { $this->settings->enableMultipleFullCompanySupport(); @@ -169,7 +169,7 @@ final class AssetCheckoutTest extends TestCase } #[DataProvider('checkoutTargets')] - public function testAssetCanBeCheckedOut($data): void + public function testAssetCanBeCheckedOut($data) { ['checkout_type' => $type, 'target' => $target, 'expected_location' => $expectedLocation] = $data(); @@ -207,7 +207,7 @@ final class AssetCheckoutTest extends TestCase }); } - public function testLicenseSeatsAreAssignedToUserUponCheckout(): void + public function testLicenseSeatsAreAssignedToUserUponCheckout() { $asset = Asset::factory()->create(); $seat = LicenseSeat::factory()->assignedToAsset($asset)->create(); @@ -224,7 +224,7 @@ final class AssetCheckoutTest extends TestCase $this->assertTrue($user->fresh()->licenses->contains($seat->license)); } - public function testLastCheckoutUsesCurrentDateIfNotProvided(): void + public function testLastCheckoutUsesCurrentDateIfNotProvided() { $asset = Asset::factory()->create(['last_checkout' => now()->subMonth()]); @@ -239,7 +239,7 @@ final class AssetCheckoutTest extends TestCase $this->assertTrue(Carbon::parse($asset->last_checkout)->diffInSeconds(now()) < 2); } - public function testAssetCheckoutPageIsRedirectedIfModelIsInvalid(): void + public function testAssetCheckoutPageIsRedirectedIfModelIsInvalid() { $asset = Asset::factory()->create(); @@ -253,7 +253,7 @@ final class AssetCheckoutTest extends TestCase ->assertRedirect(route('hardware.show',['hardware' => $asset->id])); } - public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex(): void + public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex() { $asset = Asset::factory()->create(); @@ -268,7 +268,7 @@ final class AssetCheckoutTest extends TestCase ->assertRedirect(route('hardware.index')); } - public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem(): void + public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem() { $asset = Asset::factory()->create(); @@ -284,7 +284,7 @@ final class AssetCheckoutTest extends TestCase ->assertRedirect(route('hardware.show', ['hardware' => $asset->id])); } - public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsUserTarget(): void + public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsUserTarget() { $user = User::factory()->create(); $asset = Asset::factory()->create(); @@ -301,7 +301,7 @@ final class AssetCheckoutTest extends TestCase ->assertRedirect(route('users.show', ['user' => $user])); } - public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsAssetTarget(): void + public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsAssetTarget() { $target = Asset::factory()->create(); $asset = Asset::factory()->create(); @@ -318,7 +318,7 @@ final class AssetCheckoutTest extends TestCase ->assertRedirect(route('hardware.show', ['hardware' => $target])); } - public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsLocationTarget(): void + public function testAssetCheckoutPagePostIsRedirectedIfRedirectSelectionIsLocationTarget() { $target = Location::factory()->create(); $asset = Asset::factory()->create(); diff --git a/tests/Feature/Checkouts/Ui/ComponentsCheckoutTest.php b/tests/Feature/Checkouts/Ui/ComponentsCheckoutTest.php index 5f8e8d6f3e..ab79388677 100644 --- a/tests/Feature/Checkouts/Ui/ComponentsCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/ComponentsCheckoutTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class ComponentsCheckoutTest extends TestCase { - public function testCheckingOutComponentRequiresCorrectPermission(): void + public function testCheckingOutComponentRequiresCorrectPermission() { $this->actingAs(User::factory()->create()) ->post(route('components.checkout.store', [ @@ -18,7 +18,7 @@ final class ComponentsCheckoutTest extends TestCase ->assertForbidden(); } - public function testComponentCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex(): void + public function testComponentCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex() { $component = Component::factory()->create(); @@ -33,7 +33,7 @@ final class ComponentsCheckoutTest extends TestCase ->assertRedirect(route('components.index')); } - public function testComponentCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem(): void + public function testComponentCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem() { $component = Component::factory()->create(); @@ -48,7 +48,7 @@ final class ComponentsCheckoutTest extends TestCase ->assertRedirect(route('components.show', ['component' => $component->id])); } - public function testComponentCheckoutPagePostIsRedirectedIfRedirectSelectionIsTarget(): void + public function testComponentCheckoutPagePostIsRedirectedIfRedirectSelectionIsTarget() { $asset = Asset::factory()->create(); $component = Component::factory()->create(); diff --git a/tests/Feature/Checkouts/Ui/ConsumableCheckoutTest.php b/tests/Feature/Checkouts/Ui/ConsumableCheckoutTest.php index e08d101a08..f85031ccd3 100644 --- a/tests/Feature/Checkouts/Ui/ConsumableCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/ConsumableCheckoutTest.php @@ -13,14 +13,14 @@ use Tests\TestCase; final class ConsumableCheckoutTest extends TestCase { - public function testCheckingOutConsumableRequiresCorrectPermission(): void + public function testCheckingOutConsumableRequiresCorrectPermission() { $this->actingAs(User::factory()->create()) ->post(route('consumables.checkout.store', Consumable::factory()->create())) ->assertForbidden(); } - public function testValidationWhenCheckingOutConsumable(): void + public function testValidationWhenCheckingOutConsumable() { $this->actingAs(User::factory()->checkoutConsumables()->create()) ->post(route('consumables.checkout.store', Consumable::factory()->create()), [ @@ -29,7 +29,7 @@ final class ConsumableCheckoutTest extends TestCase ->assertSessionHas('error'); } - public function testConsumableMustBeAvailableWhenCheckingOut(): void + public function testConsumableMustBeAvailableWhenCheckingOut() { $this->actingAs(User::factory()->checkoutConsumables()->create()) ->post(route('consumables.checkout.store', Consumable::factory()->withoutItemsRemaining()->create()), [ @@ -38,7 +38,7 @@ final class ConsumableCheckoutTest extends TestCase ->assertSessionHas('error'); } - public function testConsumableCanBeCheckedOut(): void + public function testConsumableCanBeCheckedOut() { $consumable = Consumable::factory()->create(); $user = User::factory()->create(); @@ -51,7 +51,7 @@ final class ConsumableCheckoutTest extends TestCase $this->assertTrue($user->consumables->contains($consumable)); } - public function testUserSentNotificationUponCheckout(): void + public function testUserSentNotificationUponCheckout() { Notification::fake(); @@ -66,7 +66,7 @@ final class ConsumableCheckoutTest extends TestCase Notification::assertSentTo($user, CheckoutConsumableNotification::class); } - public function testActionLogCreatedUponCheckout(): void + public function testActionLogCreatedUponCheckout() { $consumable = Consumable::factory()->create(); $actor = User::factory()->checkoutConsumables()->create(); @@ -93,7 +93,7 @@ final class ConsumableCheckoutTest extends TestCase ); } - public function testConsumableCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex(): void + public function testConsumableCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex() { $consumable = Consumable::factory()->create(); @@ -108,7 +108,7 @@ final class ConsumableCheckoutTest extends TestCase ->assertRedirect(route('consumables.index')); } - public function testConsumableCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem(): void + public function testConsumableCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem() { $consumable = Consumable::factory()->create(); @@ -123,7 +123,7 @@ final class ConsumableCheckoutTest extends TestCase ->assertRedirect(route('consumables.show', ['consumable' => $consumable->id])); } - public function testConsumableCheckoutPagePostIsRedirectedIfRedirectSelectionIsTarget(): void + public function testConsumableCheckoutPagePostIsRedirectedIfRedirectSelectionIsTarget() { $user = User::factory()->create(); $consumable = Consumable::factory()->create(); diff --git a/tests/Feature/Checkouts/Ui/LicenseCheckoutTest.php b/tests/Feature/Checkouts/Ui/LicenseCheckoutTest.php index 6d8cb649a4..5498193352 100644 --- a/tests/Feature/Checkouts/Ui/LicenseCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/LicenseCheckoutTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; final class LicenseCheckoutTest extends TestCase { - public function testNotesAreStoredInActionLogOnCheckoutToAsset(): void + public function testNotesAreStoredInActionLogOnCheckoutToAsset() { $admin = User::factory()->superuser()->create(); $asset = Asset::factory()->create(); @@ -34,7 +34,7 @@ final class LicenseCheckoutTest extends TestCase ]); } - public function testNotesAreStoredInActionLogOnCheckoutToUser(): void + public function testNotesAreStoredInActionLogOnCheckoutToUser() { $admin = User::factory()->superuser()->create(); $licenseSeat = LicenseSeat::factory()->create(); @@ -57,7 +57,7 @@ final class LicenseCheckoutTest extends TestCase ]); } - public function testLicenseCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex(): void + public function testLicenseCheckoutPagePostIsRedirectedIfRedirectSelectionIsIndex() { $license = License::factory()->create(); @@ -72,7 +72,7 @@ final class LicenseCheckoutTest extends TestCase ->assertRedirect(route('licenses.index')); } - public function testLicenseCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem(): void + public function testLicenseCheckoutPagePostIsRedirectedIfRedirectSelectionIsItem() { $license = License::factory()->create(); @@ -86,7 +86,7 @@ final class LicenseCheckoutTest extends TestCase ->assertRedirect(route('licenses.show', ['license' => $license->id])); } - public function testLicenseCheckoutPagePostIsRedirectedIfRedirectSelectionIsUserTarget(): void + public function testLicenseCheckoutPagePostIsRedirectedIfRedirectSelectionIsUserTarget() { $user = User::factory()->create(); $license = License::factory()->create(); @@ -100,7 +100,7 @@ final class LicenseCheckoutTest extends TestCase ->assertStatus(302) ->assertRedirect(route('users.show', ['user' => $user->id])); } - public function testLicenseCheckoutPagePostIsRedirectedIfRedirectSelectionIsAssetTarget(): void + public function testLicenseCheckoutPagePostIsRedirectedIfRedirectSelectionIsAssetTarget() { $asset = Asset::factory()->create(); $license = License::factory()->create(); diff --git a/tests/Feature/Components/Api/ComponentIndexTest.php b/tests/Feature/Components/Api/ComponentIndexTest.php index df1e91544c..a0091f3159 100644 --- a/tests/Feature/Components/Api/ComponentIndexTest.php +++ b/tests/Feature/Components/Api/ComponentIndexTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class ComponentIndexTest extends TestCase { - public function testComponentIndexAdheresToCompanyScoping(): void + public function testComponentIndexAdheresToCompanyScoping() { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Feature/Components/Ui/ComponentIndexTest.php b/tests/Feature/Components/Ui/ComponentIndexTest.php index c0e8422fbc..49e062a8e7 100644 --- a/tests/Feature/Components/Ui/ComponentIndexTest.php +++ b/tests/Feature/Components/Ui/ComponentIndexTest.php @@ -7,14 +7,14 @@ use Tests\TestCase; final class ComponentIndexTest extends TestCase { - public function testPermissionRequiredToViewComponentsList(): void + public function testPermissionRequiredToViewComponentsList() { $this->actingAs(User::factory()->create()) ->get(route('components.index')) ->assertForbidden(); } - public function testUserCanListComponents(): void + public function testUserCanListComponents() { $this->actingAs(User::factory()->superuser()->create()) ->get(route('components.index')) diff --git a/tests/Feature/Console/MergeUsersTest.php b/tests/Feature/Console/MergeUsersTest.php index e775e1c4a3..e46be18c70 100644 --- a/tests/Feature/Console/MergeUsersTest.php +++ b/tests/Feature/Console/MergeUsersTest.php @@ -13,7 +13,7 @@ use Tests\TestCase; final class MergeUsersTest extends TestCase { - public function testAssetsAreTransferredOnUserMerge(): void + public function testAssetsAreTransferredOnUserMerge() { $user1 = User::factory()->create(['username' => 'user1']); $user_to_merge_into = User::factory()->create(['username' => 'user1@example.com']); diff --git a/tests/Feature/Console/OptimizeTest.php b/tests/Feature/Console/OptimizeTest.php index a6648c363f..2dd2ce6c4b 100644 --- a/tests/Feature/Console/OptimizeTest.php +++ b/tests/Feature/Console/OptimizeTest.php @@ -6,7 +6,7 @@ use Tests\TestCase; final class OptimizeTest extends TestCase { - public function testOptimizeSucceeds(): void + public function testOptimizeSucceeds() { $this->beforeApplicationDestroyed(function () { $this->artisan('config:clear'); diff --git a/tests/Feature/Consumables/Api/ConsumableIndexTest.php b/tests/Feature/Consumables/Api/ConsumableIndexTest.php index d4d4ca9ffe..2ad8601657 100644 --- a/tests/Feature/Consumables/Api/ConsumableIndexTest.php +++ b/tests/Feature/Consumables/Api/ConsumableIndexTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class ConsumableIndexTest extends TestCase { - public function testConsumableIndexAdheresToCompanyScoping(): void + public function testConsumableIndexAdheresToCompanyScoping() { [$companyA, $companyB] = Company::factory()->count(2)->create(); @@ -55,7 +55,7 @@ final class ConsumableIndexTest extends TestCase ->assertResponseContainsInRows($consumableB); } - public function testConsumableIndexReturnsExpectedSearchResults(): void + public function testConsumableIndexReturnsExpectedSearchResults() { Consumable::factory()->count(10)->create(); Consumable::factory()->count(1)->create(['name' => 'My Test Consumable']); diff --git a/tests/Feature/Consumables/Api/ConsumableUpdateTest.php b/tests/Feature/Consumables/Api/ConsumableUpdateTest.php index c622b820cc..a21052f0a2 100644 --- a/tests/Feature/Consumables/Api/ConsumableUpdateTest.php +++ b/tests/Feature/Consumables/Api/ConsumableUpdateTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; final class ConsumableUpdateTest extends TestCase { - public function testCanUpdateConsumableViaPatchWithoutCategoryType(): void + public function testCanUpdateConsumableViaPatchWithoutCategoryType() { $consumable = Consumable::factory()->create(); @@ -28,7 +28,7 @@ final class ConsumableUpdateTest extends TestCase } - public function testCannotUpdateConsumableViaPatchWithInvalidCategoryType(): void + public function testCannotUpdateConsumableViaPatchWithInvalidCategoryType() { $category = Category::factory()->create(['category_type' => 'asset']); $consumable = Consumable::factory()->create(); diff --git a/tests/Feature/Consumables/Api/ConsumableViewTest.php b/tests/Feature/Consumables/Api/ConsumableViewTest.php index 52bd4e31bd..1cc5c26e4a 100644 --- a/tests/Feature/Consumables/Api/ConsumableViewTest.php +++ b/tests/Feature/Consumables/Api/ConsumableViewTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class ConsumableViewTest extends TestCase { - public function testConsumableViewAdheresToCompanyScoping(): void + public function testConsumableViewAdheresToCompanyScoping() { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Feature/Consumables/Ui/ConsumableIndexTest.php b/tests/Feature/Consumables/Ui/ConsumableIndexTest.php index a14d551d2a..ae2ad06119 100644 --- a/tests/Feature/Consumables/Ui/ConsumableIndexTest.php +++ b/tests/Feature/Consumables/Ui/ConsumableIndexTest.php @@ -7,14 +7,14 @@ use Tests\TestCase; final class ConsumableIndexTest extends TestCase { - public function testPermissionRequiredToViewConsumablesList(): void + public function testPermissionRequiredToViewConsumablesList() { $this->actingAs(User::factory()->create()) ->get(route('consumables.index')) ->assertForbidden(); } - public function testUserCanListConsumables(): void + public function testUserCanListConsumables() { $this->actingAs(User::factory()->superuser()->create()) ->get(route('consumables.index')) diff --git a/tests/Feature/Consumables/Ui/ConsumableViewTest.php b/tests/Feature/Consumables/Ui/ConsumableViewTest.php index 7e53712071..e80f4342e2 100644 --- a/tests/Feature/Consumables/Ui/ConsumableViewTest.php +++ b/tests/Feature/Consumables/Ui/ConsumableViewTest.php @@ -8,7 +8,7 @@ use Tests\TestCase; final class ConsumableViewTest extends TestCase { - public function testPermissionRequiredToViewConsumable(): void + public function testPermissionRequiredToViewConsumable() { $consumable = Consumable::factory()->create(); $this->actingAs(User::factory()->create()) @@ -16,7 +16,7 @@ final class ConsumableViewTest extends TestCase ->assertForbidden(); } - public function testUserCanListConsumables(): void + public function testUserCanListConsumables() { $consumable = Consumable::factory()->create(); $this->actingAs(User::factory()->superuser()->create()) diff --git a/tests/Feature/DashboardTest.php b/tests/Feature/DashboardTest.php index c8452763bb..a5d60e5eff 100644 --- a/tests/Feature/DashboardTest.php +++ b/tests/Feature/DashboardTest.php @@ -7,7 +7,7 @@ use Tests\TestCase; final class DashboardTest extends TestCase { - public function testUsersWithoutAdminAccessAreRedirected(): void + public function testUsersWithoutAdminAccessAreRedirected() { $this->actingAs(User::factory()->create()) ->get(route('home')) diff --git a/tests/Feature/Departments/Api/CreateDepartmentsTest.php b/tests/Feature/Departments/Api/CreateDepartmentsTest.php index 5796fd92f0..10e7823b21 100644 --- a/tests/Feature/Departments/Api/CreateDepartmentsTest.php +++ b/tests/Feature/Departments/Api/CreateDepartmentsTest.php @@ -13,7 +13,7 @@ final class CreateDepartmentsTest extends TestCase { - public function testRequiresPermissionToCreateDepartment(): void + public function testRequiresPermissionToCreateDepartment() { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.departments.store')) diff --git a/tests/Feature/Departments/Api/DepartmentsIndexTest.php b/tests/Feature/Departments/Api/DepartmentsIndexTest.php index eff7f98a13..6fcf6b008f 100644 --- a/tests/Feature/Departments/Api/DepartmentsIndexTest.php +++ b/tests/Feature/Departments/Api/DepartmentsIndexTest.php @@ -10,19 +10,19 @@ use Tests\TestCase; final class DepartmentsIndexTest extends TestCase { - public function testViewingDepartmentIndexRequiresAuthentication(): void + public function testViewingDepartmentIndexRequiresAuthentication() { $this->getJson(route('api.departments.index'))->assertRedirect(); } - public function testViewingDepartmentIndexRequiresPermission(): void + public function testViewingDepartmentIndexRequiresPermission() { $this->actingAsForApi(User::factory()->create()) ->getJson(route('api.departments.index')) ->assertForbidden(); } - public function testDepartmentIndexReturnsExpectedDepartments(): void + public function testDepartmentIndexReturnsExpectedDepartments() { Department::factory()->count(3)->create(); @@ -42,7 +42,7 @@ final class DepartmentsIndexTest extends TestCase ->assertJson(fn(AssertableJson $json) => $json->has('rows', 3)->etc()); } - public function testDepartmentIndexAdheresToCompanyScoping(): void + public function testDepartmentIndexAdheresToCompanyScoping() { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Feature/Departments/Api/UpdateDepartmentsTest.php b/tests/Feature/Departments/Api/UpdateDepartmentsTest.php index 5e884e6fbe..d5d8c4811c 100644 --- a/tests/Feature/Departments/Api/UpdateDepartmentsTest.php +++ b/tests/Feature/Departments/Api/UpdateDepartmentsTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; final class UpdateDepartmentsTest extends TestCase { - public function testRequiresPermissionToEditDepartment(): void + public function testRequiresPermissionToEditDepartment() { $department = Department::factory()->create(); $this->actingAsForApi(User::factory()->create()) @@ -18,7 +18,7 @@ final class UpdateDepartmentsTest extends TestCase ->assertForbidden(); } - public function testCanUpdateDepartmentViaPatch(): void + public function testCanUpdateDepartmentViaPatch() { $department = Department::factory()->create(); diff --git a/tests/Feature/Departments/Ui/CreateDepartmentsTest.php b/tests/Feature/Departments/Ui/CreateDepartmentsTest.php index ef46fd13a8..6d975d5a75 100644 --- a/tests/Feature/Departments/Ui/CreateDepartmentsTest.php +++ b/tests/Feature/Departments/Ui/CreateDepartmentsTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class CreateDepartmentsTest extends TestCase { - public function testPermissionRequiredToCreateDepartment(): void + public function testPermissionRequiredToCreateDepartment() { $this->actingAs(User::factory()->create()) ->post(route('departments.store'), [ @@ -19,7 +19,7 @@ final class CreateDepartmentsTest extends TestCase ->assertForbidden(); } - public function testUserCanCreateDepartments(): void + public function testUserCanCreateDepartments() { $this->assertFalse(Department::where('name', 'Test Department')->exists()); diff --git a/tests/Feature/Departments/Ui/IndexDepartmentsTest.php b/tests/Feature/Departments/Ui/IndexDepartmentsTest.php index b642124ab0..0cd802af46 100644 --- a/tests/Feature/Departments/Ui/IndexDepartmentsTest.php +++ b/tests/Feature/Departments/Ui/IndexDepartmentsTest.php @@ -7,14 +7,14 @@ use Tests\TestCase; final class IndexDepartmentsTest extends TestCase { - public function testPermissionRequiredToViewDepartmentsList(): void + public function testPermissionRequiredToViewDepartmentsList() { $this->actingAs(User::factory()->create()) ->get(route('departments.index')) ->assertForbidden(); } - public function testUserCanListDepartments(): void + public function testUserCanListDepartments() { $this->actingAs(User::factory()->superuser()->create()) ->get(route('departments.index')) diff --git a/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php b/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php index a3864e4f2e..468176961c 100644 --- a/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php +++ b/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class UpdateDepartmentsTest extends TestCase { - public function testPermissionRequiredToStoreDepartment(): void + public function testPermissionRequiredToStoreDepartment() { $this->actingAs(User::factory()->create()) ->post(route('departments.store'), [ @@ -20,7 +20,7 @@ final class UpdateDepartmentsTest extends TestCase } - public function testUserCanEditDepartments(): void + public function testUserCanEditDepartments() { $department = Department::factory()->create(['name' => 'Test Department']); $this->assertTrue(Department::where('name', 'Test Department')->exists()); diff --git a/tests/Feature/Groups/Api/StoreGroupTest.php b/tests/Feature/Groups/Api/StoreGroupTest.php index df8f42ddfd..f48210551a 100644 --- a/tests/Feature/Groups/Api/StoreGroupTest.php +++ b/tests/Feature/Groups/Api/StoreGroupTest.php @@ -9,14 +9,14 @@ use Tests\TestCase; final class StoreGroupTest extends TestCase { - public function testStoringGroupRequiresSuperAdminPermission(): void + public function testStoringGroupRequiresSuperAdminPermission() { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.groups.store')) ->assertForbidden(); } - public function testCanStoreGroupWithPermissionsPassed(): void + public function testCanStoreGroupWithPermissionsPassed() { $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.groups.store'), [ @@ -37,7 +37,7 @@ final class StoreGroupTest extends TestCase $this->assertEquals('0', $group->decodePermissions()['reports.view']); } - public function testStoringGroupWithoutPermissionPassed(): void + public function testStoringGroupWithoutPermissionPassed() { $superuser = User::factory()->superuser()->create(); $this->actingAsForApi($superuser) @@ -61,7 +61,7 @@ final class StoreGroupTest extends TestCase ->assertOk(); } - public function testStoringGroupWithInvalidPermissionDropsBadPermission(): void + public function testStoringGroupWithInvalidPermissionDropsBadPermission() { $this->actingAsForApi(User::factory()->superuser()->create()) ->postJson(route('api.groups.store'), [ diff --git a/tests/Feature/Groups/Ui/IndexGroupTest.php b/tests/Feature/Groups/Ui/IndexGroupTest.php index a39766e25d..b9010bd303 100644 --- a/tests/Feature/Groups/Ui/IndexGroupTest.php +++ b/tests/Feature/Groups/Ui/IndexGroupTest.php @@ -7,7 +7,7 @@ use Tests\TestCase; final class IndexGroupTest extends TestCase { - public function testPermissionRequiredToViewGroupList(): void + public function testPermissionRequiredToViewGroupList() { $this->actingAs(User::factory()->create()) ->get(route('groups.index')) @@ -16,7 +16,7 @@ final class IndexGroupTest extends TestCase //$this->followRedirects($response)->assertSee('sad-panda.png'); } - public function testUserCanListGroups(): void + public function testUserCanListGroups() { $this->actingAs(User::factory()->superuser()->create()) ->get(route('groups.index')) diff --git a/tests/Feature/Licenses/Api/LicenseIndexTest.php b/tests/Feature/Licenses/Api/LicenseIndexTest.php index 11d81b06f7..1b5d933e50 100644 --- a/tests/Feature/Licenses/Api/LicenseIndexTest.php +++ b/tests/Feature/Licenses/Api/LicenseIndexTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class LicenseIndexTest extends TestCase { - public function testLicensesIndexAdheresToCompanyScoping(): void + public function testLicensesIndexAdheresToCompanyScoping() { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Feature/Licenses/Ui/CreateLicenseTest.php b/tests/Feature/Licenses/Ui/CreateLicenseTest.php index c302bbf61f..dcbe90f222 100644 --- a/tests/Feature/Licenses/Ui/CreateLicenseTest.php +++ b/tests/Feature/Licenses/Ui/CreateLicenseTest.php @@ -11,7 +11,7 @@ use Tests\TestCase; final class CreateLicenseTest extends TestCase { - public function testPermissionRequiredToViewLicense(): void + public function testPermissionRequiredToViewLicense() { $license = License::factory()->create(); $this->actingAs(User::factory()->create()) @@ -21,7 +21,7 @@ final class CreateLicenseTest extends TestCase - public function testLicenseWithoutPurchaseDateFailsValidation(): void + public function testLicenseWithoutPurchaseDateFailsValidation() { $response = $this->actingAs(User::factory()->superuser()->create()) ->from(route('licenses.create')) diff --git a/tests/Feature/Licenses/Ui/LicenseIndexTest.php b/tests/Feature/Licenses/Ui/LicenseIndexTest.php index 381fe90980..ac81ac66d5 100644 --- a/tests/Feature/Licenses/Ui/LicenseIndexTest.php +++ b/tests/Feature/Licenses/Ui/LicenseIndexTest.php @@ -7,14 +7,14 @@ use Tests\TestCase; final class LicenseIndexTest extends TestCase { - public function testPermissionRequiredToViewLicenseList(): void + public function testPermissionRequiredToViewLicenseList() { $this->actingAs(User::factory()->create()) ->get(route('licenses.index')) ->assertForbidden(); } - public function testUserCanListLicenses(): void + public function testUserCanListLicenses() { $this->actingAs(User::factory()->superuser()->create()) ->get(route('licenses.index')) diff --git a/tests/Feature/Licenses/Ui/LicenseViewTest.php b/tests/Feature/Licenses/Ui/LicenseViewTest.php index 1685e58bf3..f4b41f2df8 100644 --- a/tests/Feature/Licenses/Ui/LicenseViewTest.php +++ b/tests/Feature/Licenses/Ui/LicenseViewTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class LicenseViewTest extends TestCase { - public function testPermissionRequiredToViewLicense(): void + public function testPermissionRequiredToViewLicense() { $license = License::factory()->create(); $this->actingAs(User::factory()->create()) @@ -17,7 +17,7 @@ final class LicenseViewTest extends TestCase ->assertForbidden(); } - public function testLicenseWithPurchaseDateDepreciatesCorrectly(): void + public function testLicenseWithPurchaseDateDepreciatesCorrectly() { $depreciation = Depreciation::factory()->create(['months' => 12]); $license = License::factory()->create(['depreciation_id' => $depreciation->id, 'purchase_date' => '2020-01-01']); diff --git a/tests/Feature/Livewire/CategoryEditFormTest.php b/tests/Feature/Livewire/CategoryEditFormTest.php index 3e75781d18..6b5a32123e 100644 --- a/tests/Feature/Livewire/CategoryEditFormTest.php +++ b/tests/Feature/Livewire/CategoryEditFormTest.php @@ -8,12 +8,12 @@ use Tests\TestCase; final class CategoryEditFormTest extends TestCase { - public function testTheComponentCanRender(): void + public function testTheComponentCanRender() { Livewire::test(CategoryEditForm::class)->assertStatus(200); } - public function testSendEmailCheckboxIsCheckedOnLoadWhenSendEmailIsExistingSetting(): void + public function testSendEmailCheckboxIsCheckedOnLoadWhenSendEmailIsExistingSetting() { Livewire::test(CategoryEditForm::class, [ 'sendCheckInEmail' => true, @@ -22,7 +22,7 @@ final class CategoryEditFormTest extends TestCase ])->assertSet('sendCheckInEmail', true); } - public function testSendEmailCheckboxIsCheckedOnLoadWhenCategoryEulaSet(): void + public function testSendEmailCheckboxIsCheckedOnLoadWhenCategoryEulaSet() { Livewire::test(CategoryEditForm::class, [ 'sendCheckInEmail' => false, @@ -31,7 +31,7 @@ final class CategoryEditFormTest extends TestCase ])->assertSet('sendCheckInEmail', true); } - public function testSendEmailCheckboxIsCheckedOnLoadWhenUsingDefaultEula(): void + public function testSendEmailCheckboxIsCheckedOnLoadWhenUsingDefaultEula() { Livewire::test(CategoryEditForm::class, [ 'sendCheckInEmail' => false, @@ -40,7 +40,7 @@ final class CategoryEditFormTest extends TestCase ])->assertSet('sendCheckInEmail', true); } - public function testSendEmailCheckBoxIsUncheckedOnLoadWhenSendEmailIsFalseNoCategoryEulaSetAndNotUsingDefaultEula(): void + public function testSendEmailCheckBoxIsUncheckedOnLoadWhenSendEmailIsFalseNoCategoryEulaSetAndNotUsingDefaultEula() { Livewire::test(CategoryEditForm::class, [ 'sendCheckInEmail' => false, @@ -49,7 +49,7 @@ final class CategoryEditFormTest extends TestCase ])->assertSet('sendCheckInEmail', false); } - public function testSendEmailCheckboxIsCheckedWhenCategoryEulaEntered(): void + public function testSendEmailCheckboxIsCheckedWhenCategoryEulaEntered() { Livewire::test(CategoryEditForm::class, [ 'sendCheckInEmail' => false, @@ -59,7 +59,7 @@ final class CategoryEditFormTest extends TestCase ->assertSet('sendCheckInEmail', true); } - public function testSendEmailCheckboxCheckedAndDisabledAndEulaTextDisabledWhenUseDefaultEulaSelected(): void + public function testSendEmailCheckboxCheckedAndDisabledAndEulaTextDisabledWhenUseDefaultEulaSelected() { Livewire::test(CategoryEditForm::class, [ 'sendCheckInEmail' => false, @@ -71,7 +71,7 @@ final class CategoryEditFormTest extends TestCase ->assertSet('sendCheckInEmailDisabled', true); } - public function testSendEmailCheckboxEnabledAndSetToOriginalValueWhenNoCategoryEulaAndNotUsingGlobalEula(): void + public function testSendEmailCheckboxEnabledAndSetToOriginalValueWhenNoCategoryEulaAndNotUsingGlobalEula() { Livewire::test(CategoryEditForm::class, [ 'eulaText' => 'Some Content', @@ -94,7 +94,7 @@ final class CategoryEditFormTest extends TestCase ->assertSet('sendCheckInEmailDisabled', false); } - public function testEulaFieldEnabledOnLoadWhenNotUsingDefaultEula(): void + public function testEulaFieldEnabledOnLoadWhenNotUsingDefaultEula() { Livewire::test(CategoryEditForm::class, [ 'sendCheckInEmail' => false, diff --git a/tests/Feature/Locations/Api/CreateLocationsTest.php b/tests/Feature/Locations/Api/CreateLocationsTest.php index b114266d4d..b084c42073 100644 --- a/tests/Feature/Locations/Api/CreateLocationsTest.php +++ b/tests/Feature/Locations/Api/CreateLocationsTest.php @@ -9,14 +9,14 @@ use Tests\TestCase; final class CreateLocationsTest extends TestCase { - public function testRequiresPermissionToCreateLocation(): void + public function testRequiresPermissionToCreateLocation() { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.departments.store')) ->assertForbidden(); } - public function testCannotCreateNewLocationsWithTheSameName(): void + public function testCannotCreateNewLocationsWithTheSameName() { $location = Location::factory()->create(); $location2 = Location::factory()->create(); @@ -33,7 +33,7 @@ final class CreateLocationsTest extends TestCase } - public function testUserCannotCreateLocationsThatAreTheirOwnParent(): void + public function testUserCannotCreateLocationsThatAreTheirOwnParent() { $location = Location::factory()->create(); diff --git a/tests/Feature/Locations/Api/DeleteLocationsTest.php b/tests/Feature/Locations/Api/DeleteLocationsTest.php index 111fdb1caf..8f08919686 100644 --- a/tests/Feature/Locations/Api/DeleteLocationsTest.php +++ b/tests/Feature/Locations/Api/DeleteLocationsTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; final class DeleteLocationsTest extends TestCase { - public function testErrorReturnedViaApiIfLocationDoesNotExist(): void + public function testErrorReturnedViaApiIfLocationDoesNotExist() { $this->actingAsForApi(User::factory()->superuser()->create()) ->deleteJson(route('api.users.destroy', 'invalid-id')) @@ -20,7 +20,7 @@ final class DeleteLocationsTest extends TestCase ->json(); } - public function testErrorReturnedViaApiIfLocationIsAlreadyDeleted(): void + public function testErrorReturnedViaApiIfLocationIsAlreadyDeleted() { $location = Location::factory()->deletedLocation()->create(); $this->actingAsForApi(User::factory()->superuser()->create()) @@ -31,7 +31,7 @@ final class DeleteLocationsTest extends TestCase ->json(); } - public function testDisallowLocationDeletionViaApiIfStillHasPeople(): void + public function testDisallowLocationDeletionViaApiIfStillHasPeople() { $location = Location::factory()->create(); User::factory()->count(5)->create(['location_id' => $location->id]); @@ -46,7 +46,7 @@ final class DeleteLocationsTest extends TestCase ->json(); } - public function testDisallowUserDeletionViaApiIfStillHasChildLocations(): void + public function testDisallowUserDeletionViaApiIfStillHasChildLocations() { $parent = Location::factory()->create(); Location::factory()->count(5)->create(['parent_id' => $parent->id]); @@ -60,7 +60,7 @@ final class DeleteLocationsTest extends TestCase ->json(); } - public function testDisallowUserDeletionViaApiIfStillHasAssetsAssigned(): void + public function testDisallowUserDeletionViaApiIfStillHasAssetsAssigned() { $location = Location::factory()->create(); Asset::factory()->count(5)->assignedToLocation($location)->create(); @@ -75,7 +75,7 @@ final class DeleteLocationsTest extends TestCase ->json(); } - public function testDisallowUserDeletionViaApiIfStillHasAssetsAsLocation(): void + public function testDisallowUserDeletionViaApiIfStillHasAssetsAsLocation() { $location = Location::factory()->create(); Asset::factory()->count(5)->create(['location_id' => $location->id]); diff --git a/tests/Feature/Locations/Api/IndexLocationsTest.php b/tests/Feature/Locations/Api/IndexLocationsTest.php index 6a1a7474cf..3c6309a78a 100644 --- a/tests/Feature/Locations/Api/IndexLocationsTest.php +++ b/tests/Feature/Locations/Api/IndexLocationsTest.php @@ -10,19 +10,19 @@ use Tests\TestCase; final class IndexLocationsTest extends TestCase { - public function testViewingLocationIndexRequiresAuthentication(): void + public function testViewingLocationIndexRequiresAuthentication() { $this->getJson(route('api.locations.index'))->assertRedirect(); } - public function testViewingLocationIndexRequiresPermission(): void + public function testViewingLocationIndexRequiresPermission() { $this->actingAsForApi(User::factory()->create()) ->getJson(route('api.locations.index')) ->assertForbidden(); } - public function testLocationIndexReturnsExpectedLocations(): void + public function testLocationIndexReturnsExpectedLocations() { Location::factory()->count(3)->create(); diff --git a/tests/Feature/Locations/Api/LocationsForSelectListTest.php b/tests/Feature/Locations/Api/LocationsForSelectListTest.php index 563135dddb..4e20ef3d86 100644 --- a/tests/Feature/Locations/Api/LocationsForSelectListTest.php +++ b/tests/Feature/Locations/Api/LocationsForSelectListTest.php @@ -9,14 +9,14 @@ use Tests\TestCase; final class LocationsForSelectListTest extends TestCase { - public function testGettingLocationListRequiresProperPermission(): void + public function testGettingLocationListRequiresProperPermission() { $this->actingAsForApi(User::factory()->create()) ->getJson(route('api.locations.selectlist')) ->assertForbidden(); } - public function testLocationsReturned(): void + public function testLocationsReturned() { Location::factory()->create(); @@ -35,7 +35,7 @@ final class LocationsForSelectListTest extends TestCase ->assertJson(fn(AssertableJson $json) => $json->has('results', 1)->etc()); } - public function testLocationsAreReturnedWhenUserIsUpdatingTheirProfileAndHasPermissionToUpdateLocation(): void + public function testLocationsAreReturnedWhenUserIsUpdatingTheirProfileAndHasPermissionToUpdateLocation() { $this->actingAsForApi(User::factory()->canEditOwnLocation()->create()) ->withHeader('referer', route('profile')) diff --git a/tests/Feature/Locations/Api/LocationsViewTest.php b/tests/Feature/Locations/Api/LocationsViewTest.php index 270db594e8..618bf9c593 100644 --- a/tests/Feature/Locations/Api/LocationsViewTest.php +++ b/tests/Feature/Locations/Api/LocationsViewTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class LocationsViewTest extends TestCase { - public function testViewingLocationRequiresPermission(): void + public function testViewingLocationRequiresPermission() { $location = Location::factory()->create(); $this->actingAsForApi(User::factory()->create()) @@ -17,7 +17,7 @@ final class LocationsViewTest extends TestCase ->assertForbidden(); } - public function testViewingLocationAssetIndexRequiresPermission(): void + public function testViewingLocationAssetIndexRequiresPermission() { $location = Location::factory()->create(); $this->actingAsForApi(User::factory()->create()) @@ -25,7 +25,7 @@ final class LocationsViewTest extends TestCase ->assertForbidden(); } - public function testViewingLocationAssetIndex(): void + public function testViewingLocationAssetIndex() { $location = Location::factory()->create(); Asset::factory()->count(3)->assignedToLocation($location)->create(); diff --git a/tests/Feature/Locations/Api/UpdateLocationsTest.php b/tests/Feature/Locations/Api/UpdateLocationsTest.php index 6cc52cfc60..ca38568714 100644 --- a/tests/Feature/Locations/Api/UpdateLocationsTest.php +++ b/tests/Feature/Locations/Api/UpdateLocationsTest.php @@ -9,14 +9,14 @@ use Tests\TestCase; final class UpdateLocationsTest extends TestCase { - public function testRequiresPermissionToEditLocation(): void + public function testRequiresPermissionToEditLocation() { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.locations.store', Location::factory()->create())) ->assertForbidden(); } - public function testCanUpdateLocationViaPatch(): void + public function testCanUpdateLocationViaPatch() { $location = Location::factory()->create(); diff --git a/tests/Feature/Locations/Ui/CreateLocationsTest.php b/tests/Feature/Locations/Ui/CreateLocationsTest.php index 0994e69e06..ef981d7d1c 100644 --- a/tests/Feature/Locations/Ui/CreateLocationsTest.php +++ b/tests/Feature/Locations/Ui/CreateLocationsTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class CreateLocationsTest extends TestCase { - public function testPermissionRequiredToCreateLocation(): void + public function testPermissionRequiredToCreateLocation() { $this->actingAs(User::factory()->create()) ->post(route('locations.store'), [ @@ -19,7 +19,7 @@ final class CreateLocationsTest extends TestCase ->assertForbidden(); } - public function testUserCanCreateLocations(): void + public function testUserCanCreateLocations() { $this->assertFalse(Location::where('name', 'Test Location')->exists()); diff --git a/tests/Feature/Locations/Ui/IndexLocationsTest.php b/tests/Feature/Locations/Ui/IndexLocationsTest.php index cc74cfd919..23574ae0ca 100644 --- a/tests/Feature/Locations/Ui/IndexLocationsTest.php +++ b/tests/Feature/Locations/Ui/IndexLocationsTest.php @@ -7,14 +7,14 @@ use Tests\TestCase; final class IndexLocationsTest extends TestCase { - public function testPermissionRequiredToViewLocationsList(): void + public function testPermissionRequiredToViewLocationsList() { $this->actingAs(User::factory()->create()) ->get(route('locations.index')) ->assertForbidden(); } - public function testUserCanListLocations(): void + public function testUserCanListLocations() { $this->actingAs(User::factory()->superuser()->create()) ->get(route('locations.index')) diff --git a/tests/Feature/Locations/Ui/UpdateLocationsTest.php b/tests/Feature/Locations/Ui/UpdateLocationsTest.php index a93a679b79..0db66a800c 100644 --- a/tests/Feature/Locations/Ui/UpdateLocationsTest.php +++ b/tests/Feature/Locations/Ui/UpdateLocationsTest.php @@ -8,7 +8,7 @@ use Tests\TestCase; final class UpdateLocationsTest extends TestCase { - public function testPermissionRequiredToStoreLocation(): void + public function testPermissionRequiredToStoreLocation() { $this->actingAs(User::factory()->create()) ->post(route('locations.store'), [ @@ -19,7 +19,7 @@ final class UpdateLocationsTest extends TestCase } - public function testUserCanEditLocations(): void + public function testUserCanEditLocations() { $location = Location::factory()->create(['name' => 'Test Location']); $this->assertTrue(Location::where('name', 'Test Location')->exists()); @@ -36,7 +36,7 @@ final class UpdateLocationsTest extends TestCase $this->assertTrue(Location::where('name', 'Test Location Edited')->exists()); } - public function testUserCannotEditLocationsToMakeThemTheirOwnParent(): void + public function testUserCannotEditLocationsToMakeThemTheirOwnParent() { $location = Location::factory()->create(); diff --git a/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php b/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php index 2533050494..b00472b4ed 100644 --- a/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php +++ b/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php @@ -20,7 +20,7 @@ final class EmailNotificationsUponCheckinTest extends TestCase Notification::fake(); } - public function testCheckInEmailSentToUserIfSettingEnabled(): void + public function testCheckInEmailSentToUserIfSettingEnabled() { $user = User::factory()->create(); $asset = Asset::factory()->assignedToUser($user)->create(); @@ -37,7 +37,7 @@ final class EmailNotificationsUponCheckinTest extends TestCase ); } - public function testCheckInEmailNotSentToUserIfSettingDisabled(): void + public function testCheckInEmailNotSentToUserIfSettingDisabled() { $user = User::factory()->create(); $asset = Asset::factory()->assignedToUser($user)->create(); diff --git a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php index b881dd9f14..32aa34770c 100644 --- a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php +++ b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php @@ -45,7 +45,7 @@ final class SlackNotificationsUponCheckinTest extends TestCase ]; } - public function testAccessoryCheckinSendsSlackNotificationWhenSettingEnabled(): void + public function testAccessoryCheckinSendsSlackNotificationWhenSettingEnabled() { $this->settings->enableSlackWebhook(); @@ -57,7 +57,7 @@ final class SlackNotificationsUponCheckinTest extends TestCase $this->assertSlackNotificationSent(CheckinAccessoryNotification::class); } - public function testAccessoryCheckinDoesNotSendSlackNotificationWhenSettingDisabled(): void + public function testAccessoryCheckinDoesNotSendSlackNotificationWhenSettingDisabled() { $this->settings->disableSlackWebhook(); @@ -70,7 +70,7 @@ final class SlackNotificationsUponCheckinTest extends TestCase } #[DataProvider('assetCheckInTargets')] - public function testAssetCheckinSendsSlackNotificationWhenSettingEnabled($checkoutTarget): void + public function testAssetCheckinSendsSlackNotificationWhenSettingEnabled($checkoutTarget) { $this->settings->enableSlackWebhook(); @@ -83,7 +83,7 @@ final class SlackNotificationsUponCheckinTest extends TestCase } #[DataProvider('assetCheckInTargets')] - public function testAssetCheckinDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget): void + public function testAssetCheckinDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget) { $this->settings->disableSlackWebhook(); @@ -95,7 +95,7 @@ final class SlackNotificationsUponCheckinTest extends TestCase $this->assertNoSlackNotificationSent(CheckinAssetNotification::class); } - public function testComponentCheckinDoesNotSendSlackNotification(): void + public function testComponentCheckinDoesNotSendSlackNotification() { $this->settings->enableSlackWebhook(); @@ -108,7 +108,7 @@ final class SlackNotificationsUponCheckinTest extends TestCase } #[DataProvider('licenseCheckInTargets')] - public function testLicenseCheckinSendsSlackNotificationWhenSettingEnabled($checkoutTarget): void + public function testLicenseCheckinSendsSlackNotificationWhenSettingEnabled($checkoutTarget) { $this->settings->enableSlackWebhook(); @@ -121,7 +121,7 @@ final class SlackNotificationsUponCheckinTest extends TestCase } #[DataProvider('licenseCheckInTargets')] - public function testLicenseCheckinDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget): void + public function testLicenseCheckinDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget) { $this->settings->disableSlackWebhook(); diff --git a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php index dd9633a8a4..d6ad65041a 100644 --- a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php +++ b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php @@ -47,7 +47,7 @@ final class SlackNotificationsUponCheckoutTest extends TestCase ]; } - public function testAccessoryCheckoutSendsSlackNotificationWhenSettingEnabled(): void + public function testAccessoryCheckoutSendsSlackNotificationWhenSettingEnabled() { $this->settings->enableSlackWebhook(); @@ -59,7 +59,7 @@ final class SlackNotificationsUponCheckoutTest extends TestCase $this->assertSlackNotificationSent(CheckoutAccessoryNotification::class); } - public function testAccessoryCheckoutDoesNotSendSlackNotificationWhenSettingDisabled(): void + public function testAccessoryCheckoutDoesNotSendSlackNotificationWhenSettingDisabled() { $this->settings->disableSlackWebhook(); @@ -72,7 +72,7 @@ final class SlackNotificationsUponCheckoutTest extends TestCase } #[DataProvider('assetCheckoutTargets')] - public function testAssetCheckoutSendsSlackNotificationWhenSettingEnabled($checkoutTarget): void + public function testAssetCheckoutSendsSlackNotificationWhenSettingEnabled($checkoutTarget) { $this->settings->enableSlackWebhook(); @@ -85,7 +85,7 @@ final class SlackNotificationsUponCheckoutTest extends TestCase } #[DataProvider('assetCheckoutTargets')] - public function testAssetCheckoutDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget): void + public function testAssetCheckoutDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget) { $this->settings->disableSlackWebhook(); @@ -97,7 +97,7 @@ final class SlackNotificationsUponCheckoutTest extends TestCase $this->assertNoSlackNotificationSent(CheckoutAssetNotification::class); } - public function testComponentCheckoutDoesNotSendSlackNotification(): void + public function testComponentCheckoutDoesNotSendSlackNotification() { $this->settings->enableSlackWebhook(); @@ -109,7 +109,7 @@ final class SlackNotificationsUponCheckoutTest extends TestCase Notification::assertNothingSent(); } - public function testConsumableCheckoutSendsSlackNotificationWhenSettingEnabled(): void + public function testConsumableCheckoutSendsSlackNotificationWhenSettingEnabled() { $this->settings->enableSlackWebhook(); @@ -121,7 +121,7 @@ final class SlackNotificationsUponCheckoutTest extends TestCase $this->assertSlackNotificationSent(CheckoutConsumableNotification::class); } - public function testConsumableCheckoutDoesNotSendSlackNotificationWhenSettingDisabled(): void + public function testConsumableCheckoutDoesNotSendSlackNotificationWhenSettingDisabled() { $this->settings->disableSlackWebhook(); @@ -134,7 +134,7 @@ final class SlackNotificationsUponCheckoutTest extends TestCase } #[DataProvider('licenseCheckoutTargets')] - public function testLicenseCheckoutSendsSlackNotificationWhenSettingEnabled($checkoutTarget): void + public function testLicenseCheckoutSendsSlackNotificationWhenSettingEnabled($checkoutTarget) { $this->settings->enableSlackWebhook(); @@ -147,7 +147,7 @@ final class SlackNotificationsUponCheckoutTest extends TestCase } #[DataProvider('licenseCheckoutTargets')] - public function testLicenseCheckoutDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget): void + public function testLicenseCheckoutDoesNotSendSlackNotificationWhenSettingDisabled($checkoutTarget) { $this->settings->disableSlackWebhook(); diff --git a/tests/Feature/Reporting/CustomReportTest.php b/tests/Feature/Reporting/CustomReportTest.php index ce2053c162..89dcafa2c8 100644 --- a/tests/Feature/Reporting/CustomReportTest.php +++ b/tests/Feature/Reporting/CustomReportTest.php @@ -43,7 +43,7 @@ final class CustomReportTest extends TestCase ); } - public function testCustomAssetReport(): void + public function testCustomAssetReport() { Asset::factory()->create(['name' => 'Asset A']); Asset::factory()->create(['name' => 'Asset B']); @@ -59,7 +59,7 @@ final class CustomReportTest extends TestCase ->assertSeeTextInStreamedResponse('Asset B'); } - public function testCustomAssetReportAdheresToCompanyScoping(): void + public function testCustomAssetReportAdheresToCompanyScoping() { [$companyA, $companyB] = Company::factory()->count(2)->create(); @@ -105,7 +105,7 @@ final class CustomReportTest extends TestCase ->assertSeeTextInStreamedResponse('Asset B'); } - public function testCanLimitAssetsByLastCheckIn(): void + public function testCanLimitAssetsByLastCheckIn() { Asset::factory()->create(['name' => 'Asset A', 'last_checkin' => '2023-08-01']); Asset::factory()->create(['name' => 'Asset B', 'last_checkin' => '2023-08-02']); diff --git a/tests/Feature/Reporting/UnacceptedAssetReportTest.php b/tests/Feature/Reporting/UnacceptedAssetReportTest.php index c987e82766..90ef96bc85 100644 --- a/tests/Feature/Reporting/UnacceptedAssetReportTest.php +++ b/tests/Feature/Reporting/UnacceptedAssetReportTest.php @@ -44,14 +44,14 @@ final class UnacceptedAssetReportTest extends TestCase } - public function testPermissionRequiredToViewUnacceptedAssetReport(): void + public function testPermissionRequiredToViewUnacceptedAssetReport() { $this->actingAs(User::factory()->create()) ->get(route('reports/unaccepted_assets')) ->assertForbidden(); } - public function testUserCanListUnacceptedAssets(): void + public function testUserCanListUnacceptedAssets() { $this->actingAs(User::factory()->superuser()->create()) ->get(route('reports/unaccepted_assets')) diff --git a/tests/Feature/Settings/BrandingSettingsTest.php b/tests/Feature/Settings/BrandingSettingsTest.php index 4262b63e5d..1543bdce9a 100644 --- a/tests/Feature/Settings/BrandingSettingsTest.php +++ b/tests/Feature/Settings/BrandingSettingsTest.php @@ -12,7 +12,7 @@ use App\Models\Setting; final class BrandingSettingsTest extends TestCase { - public function testSiteNameIsRequired(): void + public function testSiteNameIsRequired() { $response = $this->actingAs(User::factory()->superuser()->create()) ->from(route('settings.branding.index')) @@ -25,7 +25,7 @@ final class BrandingSettingsTest extends TestCase $this->followRedirects($response)->assertSee(trans('general.error')); } - public function testSiteNameCanBeSaved(): void + public function testSiteNameCanBeSaved() { $response = $this->actingAs(User::factory()->superuser()->create()) ->post(route('settings.branding.save', ['site_name' => 'My Awesome Site'])) @@ -38,7 +38,7 @@ final class BrandingSettingsTest extends TestCase } - public function testLogoCanBeUploaded(): void + public function testLogoCanBeUploaded() { Storage::fake('public'); $setting = Setting::factory()->create(['logo' => null]); @@ -58,7 +58,7 @@ final class BrandingSettingsTest extends TestCase Storage::disk('public')->assertExists($setting->logo); } - public function testLogoCanBeDeleted(): void + public function testLogoCanBeDeleted() { Storage::fake('public'); @@ -82,7 +82,7 @@ final class BrandingSettingsTest extends TestCase //Storage::disk('public')->assertMissing($original_file); } - public function testEmailLogoCanBeUploaded(): void + public function testEmailLogoCanBeUploaded() { Storage::fake('public'); @@ -108,7 +108,7 @@ final class BrandingSettingsTest extends TestCase // Storage::disk('public')->assertMissing($original_file); } - public function testEmailLogoCanBeDeleted(): void + public function testEmailLogoCanBeDeleted() { Storage::fake('public'); @@ -135,7 +135,7 @@ final class BrandingSettingsTest extends TestCase } - public function testLabelLogoCanBeUploaded(): void + public function testLabelLogoCanBeUploaded() { Storage::fake('public'); @@ -164,7 +164,7 @@ final class BrandingSettingsTest extends TestCase } - public function testLabelLogoCanBeDeleted(): void + public function testLabelLogoCanBeDeleted() { Storage::fake('public'); @@ -191,7 +191,7 @@ final class BrandingSettingsTest extends TestCase } - public function testDefaultAvatarCanBeUploaded(): void + public function testDefaultAvatarCanBeUploaded() { Storage::fake('public'); @@ -213,7 +213,7 @@ final class BrandingSettingsTest extends TestCase // Storage::disk('public')->assertMissing($original_file); } - public function testDefaultAvatarCanBeDeleted(): void + public function testDefaultAvatarCanBeDeleted() { Storage::fake('public'); @@ -238,7 +238,7 @@ final class BrandingSettingsTest extends TestCase // Storage::disk('public')->assertMissing($original_file); } - public function testSnipeDefaultAvatarCanBeDeleted(): void + public function testSnipeDefaultAvatarCanBeDeleted() { $setting = Setting::getSettings()->first(); @@ -263,7 +263,7 @@ final class BrandingSettingsTest extends TestCase } - public function testFaviconCanBeUploaded(): void + public function testFaviconCanBeUploaded() { $this->markTestIncomplete('This fails mimetype validation on the mock'); Storage::fake('public'); @@ -284,7 +284,7 @@ final class BrandingSettingsTest extends TestCase Storage::disk('public')->assertExists('favicon.png'); } - public function testFaviconCanBeDeleted(): void + public function testFaviconCanBeDeleted() { $this->markTestIncomplete('This fails mimetype validation on the mock'); Storage::fake('public'); diff --git a/tests/Feature/Settings/ShowSetUpPageTest.php b/tests/Feature/Settings/ShowSetUpPageTest.php index 511b31fe4a..83b0a1e3f0 100644 --- a/tests/Feature/Settings/ShowSetUpPageTest.php +++ b/tests/Feature/Settings/ShowSetUpPageTest.php @@ -302,7 +302,7 @@ final class ShowSetUpPageTest extends TestCase $this->assertSeeDirectoryPermissionError(false); } - public function testInvalidTLSCertsOkWhenCheckingForEnvFile(): void + public function testInvalidTLSCertsOkWhenCheckingForEnvFile() { //set the weird bad SSL cert place - https://self-signed.badssl.com $this->markTestIncomplete("Not yet sure how to write this test, it requires messing with .env ..."); diff --git a/tests/Feature/Users/Api/DeleteUserTest.php b/tests/Feature/Users/Api/DeleteUserTest.php index 070a40092b..2c134ccc64 100644 --- a/tests/Feature/Users/Api/DeleteUserTest.php +++ b/tests/Feature/Users/Api/DeleteUserTest.php @@ -12,7 +12,7 @@ final class DeleteUserTest extends TestCase { - public function testErrorReturnedViaApiIfUserDoesNotExist(): void + public function testErrorReturnedViaApiIfUserDoesNotExist() { $this->actingAsForApi(User::factory()->deleteUsers()->create()) ->deleteJson(route('api.users.destroy', 'invalid-id')) @@ -22,7 +22,7 @@ final class DeleteUserTest extends TestCase ->json(); } - public function testErrorReturnedViaApiIfUserIsAlreadyDeleted(): void + public function testErrorReturnedViaApiIfUserIsAlreadyDeleted() { $user = User::factory()->deletedUser()->create(); $this->actingAsForApi(User::factory()->deleteUsers()->create()) @@ -34,7 +34,7 @@ final class DeleteUserTest extends TestCase } - public function testDisallowUserDeletionViaApiIfStillManagingPeople(): void + public function testDisallowUserDeletionViaApiIfStillManagingPeople() { $manager = User::factory()->create(); User::factory()->count(5)->create(['manager_id' => $manager->id]); @@ -48,7 +48,7 @@ final class DeleteUserTest extends TestCase ->json(); } - public function testDisallowUserDeletionViaApiIfStillManagingLocations(): void + public function testDisallowUserDeletionViaApiIfStillManagingLocations() { $manager = User::factory()->create(); Location::factory()->count(5)->create(['manager_id' => $manager->id]); @@ -63,7 +63,7 @@ final class DeleteUserTest extends TestCase ->json(); } - public function testDisallowUserDeletionViaApiIfStillHasLicenses(): void + public function testDisallowUserDeletionViaApiIfStillHasLicenses() { $manager = User::factory()->create(); LicenseSeat::factory()->count(5)->create(['assigned_to' => $manager->id]); @@ -78,7 +78,7 @@ final class DeleteUserTest extends TestCase ->json(); } - public function testDeniedPermissionsForDeletingUserViaApi(): void + public function testDeniedPermissionsForDeletingUserViaApi() { $this->actingAsForApi(User::factory()->create()) ->deleteJson(route('api.users.destroy', User::factory()->create())) @@ -86,7 +86,7 @@ final class DeleteUserTest extends TestCase ->json(); } - public function testSuccessPermissionsForDeletingUserViaApi(): void + public function testSuccessPermissionsForDeletingUserViaApi() { $this->actingAsForApi(User::factory()->deleteUsers()->create()) ->deleteJson(route('api.users.destroy', User::factory()->create())) @@ -97,7 +97,7 @@ final class DeleteUserTest extends TestCase } - public function testPermissionsForDeletingIfNotInSameCompanyAndNotSuperadmin(): void + public function testPermissionsForDeletingIfNotInSameCompanyAndNotSuperadmin() { $this->settings->enableMultipleFullCompanySupport(); @@ -139,7 +139,7 @@ final class DeleteUserTest extends TestCase } - public function testUsersCannotDeleteThemselves(): void + public function testUsersCannotDeleteThemselves() { $user = User::factory()->deleteUsers()->create(); $this->actingAsForApi($user) diff --git a/tests/Feature/Users/Api/RestoreUserTest.php b/tests/Feature/Users/Api/RestoreUserTest.php index 11c5e33d07..709c2ac0fc 100644 --- a/tests/Feature/Users/Api/RestoreUserTest.php +++ b/tests/Feature/Users/Api/RestoreUserTest.php @@ -12,7 +12,7 @@ final class RestoreUserTest extends TestCase { - public function testErrorReturnedViaApiIfUserDoesNotExist(): void + public function testErrorReturnedViaApiIfUserDoesNotExist() { $this->actingAsForApi(User::factory()->deleteUsers()->create()) ->postJson(route('api.users.restore', 'invalid-id')) @@ -22,7 +22,7 @@ final class RestoreUserTest extends TestCase ->json(); } - public function testErrorReturnedViaApiIfUserIsNotDeleted(): void + public function testErrorReturnedViaApiIfUserIsNotDeleted() { $user = User::factory()->create(); $this->actingAsForApi(User::factory()->deleteUsers()->create()) @@ -34,7 +34,7 @@ final class RestoreUserTest extends TestCase } - public function testDeniedPermissionsForRestoringUserViaApi(): void + public function testDeniedPermissionsForRestoringUserViaApi() { $this->actingAsForApi(User::factory()->create()) ->postJson(route('api.users.restore', User::factory()->deletedUser()->create())) @@ -42,7 +42,7 @@ final class RestoreUserTest extends TestCase ->json(); } - public function testSuccessPermissionsForRestoringUserViaApi(): void + public function testSuccessPermissionsForRestoringUserViaApi() { $deleted_user = User::factory()->deletedUser()->create(); @@ -57,7 +57,7 @@ final class RestoreUserTest extends TestCase $this->assertNull($deleted_user->deleted_at); } - public function testPermissionsForRestoringIfNotInSameCompanyAndNotSuperadmin(): void + public function testPermissionsForRestoringIfNotInSameCompanyAndNotSuperadmin() { $this->settings->enableMultipleFullCompanySupport(); diff --git a/tests/Feature/Users/Api/UpdateUserTest.php b/tests/Feature/Users/Api/UpdateUserTest.php index de6cf116ae..918d7f0886 100644 --- a/tests/Feature/Users/Api/UpdateUserTest.php +++ b/tests/Feature/Users/Api/UpdateUserTest.php @@ -12,7 +12,7 @@ use Tests\TestCase; final class UpdateUserTest extends TestCase { - public function testCanUpdateUserViaPatch(): void + public function testCanUpdateUserViaPatch() { $admin = User::factory()->superuser()->create(); $manager = User::factory()->create(); @@ -82,7 +82,7 @@ final class UpdateUserTest extends TestCase $this->assertTrue($user->groups->contains($groupB), 'Not part of expected group'); } - public function testApiUsersCanBeActivatedWithNumber(): void + public function testApiUsersCanBeActivatedWithNumber() { $admin = User::factory()->superuser()->create(); $user = User::factory()->create(['activated' => 0]); @@ -95,7 +95,7 @@ final class UpdateUserTest extends TestCase $this->assertEquals(1, $user->refresh()->activated); } - public function testApiUsersCanBeActivatedWithBooleanTrue(): void + public function testApiUsersCanBeActivatedWithBooleanTrue() { $admin = User::factory()->superuser()->create(); $user = User::factory()->create(['activated' => false]); @@ -108,7 +108,7 @@ final class UpdateUserTest extends TestCase $this->assertEquals(1, $user->refresh()->activated); } - public function testApiUsersCanBeDeactivatedWithNumber(): void + public function testApiUsersCanBeDeactivatedWithNumber() { $admin = User::factory()->superuser()->create(); $user = User::factory()->create(['activated' => true]); @@ -121,7 +121,7 @@ final class UpdateUserTest extends TestCase $this->assertEquals(0, $user->refresh()->activated); } - public function testApiUsersCanBeDeactivatedWithBooleanFalse(): void + public function testApiUsersCanBeDeactivatedWithBooleanFalse() { $admin = User::factory()->superuser()->create(); $user = User::factory()->create(['activated' => true]); @@ -134,7 +134,7 @@ final class UpdateUserTest extends TestCase $this->assertEquals(0, $user->refresh()->activated); } - public function testUsersScopedToCompanyDuringUpdateWhenMultipleFullCompanySupportEnabled(): void + public function testUsersScopedToCompanyDuringUpdateWhenMultipleFullCompanySupportEnabled() { $this->settings->enableMultipleFullCompanySupport(); @@ -223,7 +223,7 @@ final class UpdateUserTest extends TestCase ->json(); } - public function testUserGroupsAreOnlyUpdatedIfAuthenticatedUserIsSuperUser(): void + public function testUserGroupsAreOnlyUpdatedIfAuthenticatedUserIsSuperUser() { $groupToJoin = Group::factory()->create(); @@ -250,7 +250,7 @@ final class UpdateUserTest extends TestCase $this->assertTrue($userToUpdateByToUserBySuperuser->refresh()->groups->contains($groupToJoin)); } - public function testUserGroupsCanBeClearedBySuperUser(): void + public function testUserGroupsCanBeClearedBySuperUser() { $normalUser = User::factory()->editUsers()->create(); $superUser = User::factory()->superuser()->create(); @@ -276,7 +276,7 @@ final class UpdateUserTest extends TestCase $this->assertFalse($anotherUserToUpdate->refresh()->groups->contains($joinedGroup)); } - public function testNonSuperuserCannotUpdateOwnGroups(): void + public function testNonSuperuserCannotUpdateOwnGroups() { $groupToJoin = Group::factory()->create(); $user = User::factory()->editUsers()->create(); @@ -292,7 +292,7 @@ final class UpdateUserTest extends TestCase } - public function testNonSuperuserCannotUpdateGroups(): void + public function testNonSuperuserCannotUpdateGroups() { $user = User::factory()->editUsers()->create(); $group = Group::factory()->create(); @@ -313,7 +313,7 @@ final class UpdateUserTest extends TestCase } - public function testUsersGroupsAreNotClearedIfNoGroupPassedBySuperUser(): void + public function testUsersGroupsAreNotClearedIfNoGroupPassedBySuperUser() { $user = User::factory()->create(); $superUser = User::factory()->superuser()->create(); @@ -327,7 +327,7 @@ final class UpdateUserTest extends TestCase $this->assertTrue($user->refresh()->groups->contains($group)); } - public function testMultipleGroupsUpdateBySuperUser(): void + public function testMultipleGroupsUpdateBySuperUser() { $user = User::factory()->create(); $superUser = User::factory()->superuser()->create(); diff --git a/tests/Feature/Users/Api/UserSearchTest.php b/tests/Feature/Users/Api/UserSearchTest.php index 5dea41aa64..8478171c75 100644 --- a/tests/Feature/Users/Api/UserSearchTest.php +++ b/tests/Feature/Users/Api/UserSearchTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class UserSearchTest extends TestCase { - public function testCanSearchByUserFirstAndLastName(): void + public function testCanSearchByUserFirstAndLastName() { User::factory()->create(['first_name' => 'Luke', 'last_name' => 'Skywalker']); User::factory()->create(['first_name' => 'Darth', 'last_name' => 'Vader']); @@ -24,7 +24,7 @@ final class UserSearchTest extends TestCase $this->assertFalse($results->pluck('name')->contains(fn($text) => str_contains($text, 'Darth'))); } - public function testResultsWhenSearchingForActiveUsers(): void + public function testResultsWhenSearchingForActiveUsers() { User::factory()->create(['first_name' => 'Active', 'last_name' => 'User']); User::factory()->create(['first_name' => 'Deleted', 'last_name' => 'User'])->delete(); @@ -53,7 +53,7 @@ final class UserSearchTest extends TestCase ); } - public function testResultsWhenSearchingForDeletedUsers(): void + public function testResultsWhenSearchingForDeletedUsers() { User::factory()->create(['first_name' => 'Active', 'last_name' => 'User']); User::factory()->create(['first_name' => 'Deleted', 'last_name' => 'User'])->delete(); @@ -82,7 +82,7 @@ final class UserSearchTest extends TestCase ); } - public function testUsersScopedToCompanyWhenMultipleFullCompanySupportEnabled(): void + public function testUsersScopedToCompanyWhenMultipleFullCompanySupportEnabled() { $this->settings->enableMultipleFullCompanySupport(); @@ -110,7 +110,7 @@ final class UserSearchTest extends TestCase ); } - public function testUsersScopedToCompanyDuringSearchWhenMultipleFullCompanySupportEnabled(): void + public function testUsersScopedToCompanyDuringSearchWhenMultipleFullCompanySupportEnabled() { $this->settings->enableMultipleFullCompanySupport(); @@ -145,7 +145,7 @@ final class UserSearchTest extends TestCase ); } - public function testUsersIndexWhenInvalidSortFieldIsPassed(): void + public function testUsersIndexWhenInvalidSortFieldIsPassed() { $this->markIncompleteIfSqlite('This test is not compatible with SQLite'); diff --git a/tests/Feature/Users/Api/UsersForSelectListTest.php b/tests/Feature/Users/Api/UsersForSelectListTest.php index 2921bc4188..237ee57c83 100644 --- a/tests/Feature/Users/Api/UsersForSelectListTest.php +++ b/tests/Feature/Users/Api/UsersForSelectListTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; final class UsersForSelectListTest extends TestCase { - public function testUsersAreReturned(): void + public function testUsersAreReturned() { $users = User::factory()->superuser()->count(3)->create(); @@ -27,7 +27,7 @@ final class UsersForSelectListTest extends TestCase ->assertJson(fn(AssertableJson $json) => $json->has('results', 3)->etc()); } - public function testUsersCanBeSearchedByFirstAndLastName(): void + public function testUsersCanBeSearchedByFirstAndLastName() { User::factory()->create(['first_name' => 'Luke', 'last_name' => 'Skywalker']); @@ -40,7 +40,7 @@ final class UsersForSelectListTest extends TestCase $this->assertTrue($results->pluck('text')->contains(fn($text) => str_contains($text, 'Luke'))); } - public function testUsersScopedToCompanyWhenMultipleFullCompanySupportEnabled(): void + public function testUsersScopedToCompanyWhenMultipleFullCompanySupportEnabled() { $this->settings->enableMultipleFullCompanySupport(); @@ -68,7 +68,7 @@ final class UsersForSelectListTest extends TestCase ); } - public function testUsersScopedToCompanyDuringSearchWhenMultipleFullCompanySupportEnabled(): void + public function testUsersScopedToCompanyDuringSearchWhenMultipleFullCompanySupportEnabled() { $this->settings->enableMultipleFullCompanySupport(); diff --git a/tests/Feature/Users/Api/ViewUserTest.php b/tests/Feature/Users/Api/ViewUserTest.php index 738907e5a3..325c8ec1f4 100644 --- a/tests/Feature/Users/Api/ViewUserTest.php +++ b/tests/Feature/Users/Api/ViewUserTest.php @@ -11,7 +11,7 @@ use Tests\TestCase; final class ViewUserTest extends TestCase { - public function testCanReturnUser(): void + public function testCanReturnUser() { $user = User::factory()->create(); diff --git a/tests/Feature/Users/Ui/DeleteUserTest.php b/tests/Feature/Users/Ui/DeleteUserTest.php index 6dd5d84f71..6d71041d61 100644 --- a/tests/Feature/Users/Ui/DeleteUserTest.php +++ b/tests/Feature/Users/Ui/DeleteUserTest.php @@ -14,7 +14,7 @@ use App\Models\Asset; final class DeleteUserTest extends TestCase { - public function testUserCanDeleteAnotherUser(): void + public function testUserCanDeleteAnotherUser() { $user = User::factory()->deleteUsers()->viewUsers()->create(); $this->actingAs(User::factory()->deleteUsers()->viewUsers()->create())->assertTrue($user->isDeletable()); @@ -28,7 +28,7 @@ final class DeleteUserTest extends TestCase } - public function testErrorReturnedIfUserDoesNotExist(): void + public function testErrorReturnedIfUserDoesNotExist() { $response = $this->actingAs(User::factory()->deleteUsers()->viewUsers()->create()) ->delete(route('users.destroy', ['user' => '40596803548609346'])) @@ -37,7 +37,7 @@ final class DeleteUserTest extends TestCase $this->followRedirects($response)->assertSee(trans('alert-danger')); } - public function testErrorReturnedIfUserIsAlreadyDeleted(): void + public function testErrorReturnedIfUserIsAlreadyDeleted() { $user = User::factory()->deletedUser()->viewUsers()->create(); $response = $this->actingAs(User::factory()->deleteUsers()->viewUsers()->create()) @@ -49,7 +49,7 @@ final class DeleteUserTest extends TestCase } - public function testFmcsPermissionsToDeleteUser(): void + public function testFmcsPermissionsToDeleteUser() { $this->settings->enableMultipleFullCompanySupport(); @@ -90,7 +90,7 @@ final class DeleteUserTest extends TestCase } - public function testDisallowUserDeletionIfStillManagingPeople(): void + public function testDisallowUserDeletionIfStillManagingPeople() { $manager = User::factory()->create(); User::factory()->count(1)->create(['manager_id' => $manager->id]); @@ -105,7 +105,7 @@ final class DeleteUserTest extends TestCase $this->followRedirects($response)->assertSee('Error'); } - public function testDisallowUserDeletionIfStillManagingLocations(): void + public function testDisallowUserDeletionIfStillManagingLocations() { $manager = User::factory()->create(); Location::factory()->count(2)->create(['manager_id' => $manager->id]); @@ -120,7 +120,7 @@ final class DeleteUserTest extends TestCase $this->followRedirects($response)->assertSee('Error'); } - public function testDisallowUserDeletionIfStillHaveAccessories(): void + public function testDisallowUserDeletionIfStillHaveAccessories() { $user = User::factory()->create(); Accessory::factory()->count(3)->checkedOutToUser($user)->create(); @@ -135,7 +135,7 @@ final class DeleteUserTest extends TestCase $this->followRedirects($response)->assertSee('Error'); } - public function testDisallowUserDeletionIfStillHaveLicenses(): void + public function testDisallowUserDeletionIfStillHaveLicenses() { $user = User::factory()->create(); LicenseSeat::factory()->count(4)->create(['assigned_to' => $user->id]); @@ -151,7 +151,7 @@ final class DeleteUserTest extends TestCase } - public function testAllowUserDeletionIfNotManagingLocations(): void + public function testAllowUserDeletionIfNotManagingLocations() { $manager = User::factory()->create(); $this->actingAs(User::factory()->deleteUsers()->viewUsers()->create())->assertTrue($manager->isDeletable()); @@ -165,14 +165,14 @@ final class DeleteUserTest extends TestCase } - public function testDisallowUserDeletionIfNoDeletePermissions(): void + public function testDisallowUserDeletionIfNoDeletePermissions() { $manager = User::factory()->create(); Location::factory()->create(['manager_id' => $manager->id]); $this->actingAs(User::factory()->editUsers()->viewUsers()->create())->assertFalse($manager->isDeletable()); } - public function testDisallowUserDeletionIfTheyStillHaveAssets(): void + public function testDisallowUserDeletionIfTheyStillHaveAssets() { $user = User::factory()->create(); $asset = Asset::factory()->create(); @@ -195,7 +195,7 @@ final class DeleteUserTest extends TestCase } - public function testUsersCannotDeleteThemselves(): void + public function testUsersCannotDeleteThemselves() { $manager = User::factory()->deleteUsers()->viewUsers()->create(); $this->actingAs(User::factory()->deleteUsers()->viewUsers()->create())->assertTrue($manager->isDeletable()); diff --git a/tests/Feature/Users/Ui/MergeUsersTest.php b/tests/Feature/Users/Ui/MergeUsersTest.php index 7877e94fb1..2685a72e88 100644 --- a/tests/Feature/Users/Ui/MergeUsersTest.php +++ b/tests/Feature/Users/Ui/MergeUsersTest.php @@ -13,7 +13,7 @@ use Tests\TestCase; final class MergeUsersTest extends TestCase { - public function testAssetsAreTransferredOnUserMerge(): void + public function testAssetsAreTransferredOnUserMerge() { $user1 = User::factory()->create(); $user2 = User::factory()->create(); @@ -39,7 +39,7 @@ final class MergeUsersTest extends TestCase } - public function testLicensesAreTransferredOnUserMerge(): void + public function testLicensesAreTransferredOnUserMerge() { $user1 = User::factory()->create(); $user2 = User::factory()->create(); @@ -67,7 +67,7 @@ final class MergeUsersTest extends TestCase } - public function testAccessoriesTransferredOnUserMerge(): void + public function testAccessoriesTransferredOnUserMerge() { $user1 = User::factory()->create(); $user2 = User::factory()->create(); @@ -95,7 +95,7 @@ final class MergeUsersTest extends TestCase } - public function testConsumablesTransferredOnUserMerge(): void + public function testConsumablesTransferredOnUserMerge() { $user1 = User::factory()->create(); $user2 = User::factory()->create(); @@ -123,7 +123,7 @@ final class MergeUsersTest extends TestCase } - public function testFilesAreTransferredOnUserMerge(): void + public function testFilesAreTransferredOnUserMerge() { $user1 = User::factory()->create(); $user2 = User::factory()->create(); @@ -151,7 +151,7 @@ final class MergeUsersTest extends TestCase } - public function testAcceptancesAreTransferredOnUserMerge(): void + public function testAcceptancesAreTransferredOnUserMerge() { $user1 = User::factory()->create(); $user2 = User::factory()->create(); @@ -179,7 +179,7 @@ final class MergeUsersTest extends TestCase } - public function testUserUpdateHistoryIsTransferredOnUserMerge(): void + public function testUserUpdateHistoryIsTransferredOnUserMerge() { $user1 = User::factory()->create(); $user2 = User::factory()->create(); diff --git a/tests/Feature/Users/Ui/UpdateUserTest.php b/tests/Feature/Users/Ui/UpdateUserTest.php index 9d8cc04dfc..89c005b590 100644 --- a/tests/Feature/Users/Ui/UpdateUserTest.php +++ b/tests/Feature/Users/Ui/UpdateUserTest.php @@ -7,7 +7,7 @@ use Tests\TestCase; final class UpdateUserTest extends TestCase { - public function testUsersCanBeActivatedWithNumber(): void + public function testUsersCanBeActivatedWithNumber() { $admin = User::factory()->superuser()->create(); $user = User::factory()->create(['activated' => 0]); @@ -22,7 +22,7 @@ final class UpdateUserTest extends TestCase $this->assertEquals(1, $user->refresh()->activated); } - public function testUsersCanBeActivatedWithBooleanTrue(): void + public function testUsersCanBeActivatedWithBooleanTrue() { $admin = User::factory()->superuser()->create(); $user = User::factory()->create(['activated' => false]); @@ -37,7 +37,7 @@ final class UpdateUserTest extends TestCase $this->assertEquals(1, $user->refresh()->activated); } - public function testUsersCanBeDeactivatedWithNumber(): void + public function testUsersCanBeDeactivatedWithNumber() { $admin = User::factory()->superuser()->create(); $user = User::factory()->create(['activated' => true]); @@ -52,7 +52,7 @@ final class UpdateUserTest extends TestCase $this->assertEquals(0, $user->refresh()->activated); } - public function testUsersCanBeDeactivatedWithBooleanFalse(): void + public function testUsersCanBeDeactivatedWithBooleanFalse() { $admin = User::factory()->superuser()->create(); $user = User::factory()->create(['activated' => true]); @@ -67,7 +67,7 @@ final class UpdateUserTest extends TestCase $this->assertEquals(0, $user->refresh()->activated); } - public function testUsersUpdatingThemselvesDoNotDeactivateTheirAccount(): void + public function testUsersUpdatingThemselvesDoNotDeactivateTheirAccount() { $admin = User::factory()->superuser()->create(['activated' => true]); diff --git a/tests/Feature/Users/Ui/ViewUserTest.php b/tests/Feature/Users/Ui/ViewUserTest.php index 111e950f27..d28bbb6d31 100644 --- a/tests/Feature/Users/Ui/ViewUserTest.php +++ b/tests/Feature/Users/Ui/ViewUserTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; final class ViewUserTest extends TestCase { - public function testPermissionsForUserDetailPage(): void + public function testPermissionsForUserDetailPage() { $this->settings->enableMultipleFullCompanySupport(); @@ -29,7 +29,7 @@ final class ViewUserTest extends TestCase ->assertStatus(200); } - public function testPermissionsForPrintAllInventoryPage(): void + public function testPermissionsForPrintAllInventoryPage() { $this->settings->enableMultipleFullCompanySupport(); @@ -52,7 +52,7 @@ final class ViewUserTest extends TestCase ->assertStatus(200); } - public function testUserWithoutCompanyPermissionsCannotSendInventory(): void + public function testUserWithoutCompanyPermissionsCannotSendInventory() { Notification::fake(); diff --git a/tests/Unit/AccessoryTest.php b/tests/Unit/AccessoryTest.php index 98021c5094..2ce1b96242 100644 --- a/tests/Unit/AccessoryTest.php +++ b/tests/Unit/AccessoryTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; final class AccessoryTest extends TestCase { - public function testAnAccessoryBelongsToACompany(): void + public function testAnAccessoryBelongsToACompany() { $accessory = Accessory::factory() ->create( @@ -20,7 +20,7 @@ final class AccessoryTest extends TestCase $this->assertInstanceOf(Company::class, $accessory->company); } - public function testAnAccessoryHasALocation(): void + public function testAnAccessoryHasALocation() { $accessory = Accessory::factory() ->create( @@ -30,7 +30,7 @@ final class AccessoryTest extends TestCase $this->assertInstanceOf(Location::class, $accessory->location); } - public function testAnAccessoryBelongsToACategory(): void + public function testAnAccessoryBelongsToACategory() { $accessory = Accessory::factory()->appleBtKeyboard() ->create( @@ -45,7 +45,7 @@ final class AccessoryTest extends TestCase $this->assertEquals('accessory', $accessory->category->category_type); } - public function testAnAccessoryHasAManufacturer(): void + public function testAnAccessoryHasAManufacturer() { $accessory = Accessory::factory()->appleBtKeyboard()->create( [ diff --git a/tests/Unit/AssetMaintenanceTest.php b/tests/Unit/AssetMaintenanceTest.php index f033ba9b8f..50ccaac357 100644 --- a/tests/Unit/AssetMaintenanceTest.php +++ b/tests/Unit/AssetMaintenanceTest.php @@ -6,7 +6,7 @@ use Tests\TestCase; final class AssetMaintenanceTest extends TestCase { - public function testZerosOutWarrantyIfBlank(): void + public function testZerosOutWarrantyIfBlank() { $c = new AssetMaintenance; $c->is_warranty = ''; @@ -15,7 +15,7 @@ final class AssetMaintenanceTest extends TestCase $this->assertTrue($c->is_warranty == 4); } - public function testSetsCostsAppropriately(): void + public function testSetsCostsAppropriately() { $c = new AssetMaintenance(); $c->cost = '0.00'; @@ -26,7 +26,7 @@ final class AssetMaintenanceTest extends TestCase $this->assertTrue($c->cost === 9.5); } - public function testNullsOutNotesIfBlank(): void + public function testNullsOutNotesIfBlank() { $c = new AssetMaintenance; $c->notes = ''; @@ -35,7 +35,7 @@ final class AssetMaintenanceTest extends TestCase $this->assertTrue($c->notes === 'This is a long note'); } - public function testNullsOutCompletionDateIfBlankOrInvalid(): void + public function testNullsOutCompletionDateIfBlankOrInvalid() { $c = new AssetMaintenance; $c->completion_date = ''; diff --git a/tests/Unit/AssetModelTest.php b/tests/Unit/AssetModelTest.php index 9e4f8920f4..57ac292f73 100644 --- a/tests/Unit/AssetModelTest.php +++ b/tests/Unit/AssetModelTest.php @@ -8,7 +8,7 @@ use Tests\TestCase; final class AssetModelTest extends TestCase { - public function testAnAssetModelContainsAssets(): void + public function testAnAssetModelContainsAssets() { $category = Category::factory()->create([ 'category_type' => 'asset' diff --git a/tests/Unit/AssetTest.php b/tests/Unit/AssetTest.php index 34b1876604..7ba468ee3f 100644 --- a/tests/Unit/AssetTest.php +++ b/tests/Unit/AssetTest.php @@ -10,7 +10,7 @@ use App\Models\Setting; final class AssetTest extends TestCase { - public function testAutoIncrement(): void + public function testAutoIncrement() { $this->settings->enableAutoIncrement(); @@ -22,7 +22,7 @@ final class AssetTest extends TestCase } - public function testAutoIncrementCollision(): void + public function testAutoIncrementCollision() { $this->settings->enableAutoIncrement(); @@ -34,7 +34,7 @@ final class AssetTest extends TestCase $this->assertFalse($b->save()); } - public function testAutoIncrementDouble(): void + public function testAutoIncrementDouble() { // make one asset with the autoincrement *ONE* higher than the next auto-increment // make sure you can then still make another @@ -53,7 +53,7 @@ final class AssetTest extends TestCase $this->assertEquals($c->asset_tag, $final_number); } - public function testAutoIncrementGapAndBackfill(): void + public function testAutoIncrementGapAndBackfill() { // make one asset 3 higher than the next auto-increment // manually make one that's 1 lower than that @@ -82,7 +82,7 @@ final class AssetTest extends TestCase $this->assertEquals($final->asset_tag, $final_result); } - public function testPrefixlessAutoincrementBackfill(): void + public function testPrefixlessAutoincrementBackfill() { // TODO: COPYPASTA FROM above, is there a way to still run this test but not have it be so duplicative? $this->settings->enableAutoIncrement()->set(['auto_increment_prefix' => '']); @@ -109,7 +109,7 @@ final class AssetTest extends TestCase $this->assertEquals($final->asset_tag, $final_result); } - public function testUnzerofilledPrefixlessAutoincrementBackfill(): void + public function testUnzerofilledPrefixlessAutoincrementBackfill() { // TODO: COPYPASTA FROM above (AGAIN), is there a way to still run this test but not have it be so duplicative? $this->settings->enableAutoIncrement()->set(['auto_increment_prefix' => '','zerofill_count' => 0]); @@ -136,7 +136,7 @@ final class AssetTest extends TestCase $this->assertEquals($final->asset_tag, $final_result); } - public function testAutoIncrementBIG(): void + public function testAutoIncrementBIG() { $this->settings->enableAutoIncrement(); @@ -153,7 +153,7 @@ final class AssetTest extends TestCase $this->assertEquals(Setting::getSettings()->next_auto_tag_base, $matches[0] + 1, "Next auto increment number should be the last normally-saved one plus one, but isn't"); } - public function testAutoIncrementAlmostBIG(): void + public function testAutoIncrementAlmostBIG() { // TODO: this looks pretty close to the one above, could we maybe squish them together? $this->settings->enableAutoIncrement(); @@ -170,7 +170,7 @@ final class AssetTest extends TestCase } - public function testWarrantyExpiresAttribute(): void + public function testWarrantyExpiresAttribute() { $asset = Asset::factory() diff --git a/tests/Unit/CategoryTest.php b/tests/Unit/CategoryTest.php index 8e1fe83f83..75e79b0bd4 100644 --- a/tests/Unit/CategoryTest.php +++ b/tests/Unit/CategoryTest.php @@ -8,7 +8,7 @@ use Tests\TestCase; final class CategoryTest extends TestCase { - public function testFailsEmptyValidation(): void + public function testFailsEmptyValidation() { // An Asset requires a name, a qty, and a category_id. $a = Category::create(); @@ -24,7 +24,7 @@ final class CategoryTest extends TestCase } } - public function testACategoryCanHaveAssets(): void + public function testACategoryCanHaveAssets() { $category = Category::factory()->assetDesktopCategory()->create(); diff --git a/tests/Unit/CompanyScopingTest.php b/tests/Unit/CompanyScopingTest.php index a86a767dd0..664d6301fd 100644 --- a/tests/Unit/CompanyScopingTest.php +++ b/tests/Unit/CompanyScopingTest.php @@ -29,7 +29,7 @@ final class CompanyScopingTest extends TestCase } #[DataProvider('models')] - public function testCompanyScoping($model): void + public function testCompanyScoping($model) { [$companyA, $companyB] = Company::factory()->count(2)->create(); @@ -69,7 +69,7 @@ final class CompanyScopingTest extends TestCase $this->assertCanSee($modelB); } - public function testAssetMaintenanceCompanyScoping(): void + public function testAssetMaintenanceCompanyScoping() { [$companyA, $companyB] = Company::factory()->count(2)->create(); @@ -109,7 +109,7 @@ final class CompanyScopingTest extends TestCase $this->assertCanSee($assetMaintenanceForCompanyB); } - public function testLicenseSeatCompanyScoping(): void + public function testLicenseSeatCompanyScoping() { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Unit/ComponentTest.php b/tests/Unit/ComponentTest.php index 8d411bc7d2..d0f9605740 100644 --- a/tests/Unit/ComponentTest.php +++ b/tests/Unit/ComponentTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class ComponentTest extends TestCase { - public function testAComponentBelongsToACompany(): void + public function testAComponentBelongsToACompany() { $component = Component::factory() ->create( @@ -20,14 +20,14 @@ final class ComponentTest extends TestCase $this->assertInstanceOf(Company::class, $component->company); } - public function testAComponentHasALocation(): void + public function testAComponentHasALocation() { $component = Component::factory() ->create(['location_id' => Location::factory()->create()->id]); $this->assertInstanceOf(Location::class, $component->location); } - public function testAComponentBelongsToACategory(): void + public function testAComponentBelongsToACategory() { $component = Component::factory()->ramCrucial4() ->create( diff --git a/tests/Unit/CustomFieldTest.php b/tests/Unit/CustomFieldTest.php index 34b8f65758..da4272323b 100644 --- a/tests/Unit/CustomFieldTest.php +++ b/tests/Unit/CustomFieldTest.php @@ -10,14 +10,14 @@ use Tests\TestCase; */ final class CustomFieldTest extends TestCase { - public function testFormat(): void + public function testFormat() { $customfield = CustomField::factory()->make(['format' => 'IP']); $this->assertEquals($customfield->getAttributes()['format'], CustomField::PREDEFINED_FORMATS['IP']); //this seems undocumented... $this->assertEquals($customfield->format, 'IP'); } - public function testDbNameAscii(): void + public function testDbNameAscii() { $customfield = new CustomField(); $customfield->name = 'My hovercraft is full of eels'; @@ -26,7 +26,7 @@ final class CustomFieldTest extends TestCase } // Western Europe - public function testDbNameLatin(): void + public function testDbNameLatin() { $customfield = new CustomField(); $customfield->name = 'My hovercraft is full of eels'; @@ -35,7 +35,7 @@ final class CustomFieldTest extends TestCase } // Asian - public function testDbNameChinese(): void + public function testDbNameChinese() { $customfield = new CustomField(); $customfield->name = '我的氣墊船裝滿了鱔魚'; @@ -47,7 +47,7 @@ final class CustomFieldTest extends TestCase } } - public function testDbNameJapanese(): void + public function testDbNameJapanese() { $customfield = new CustomField(); $customfield->name = '私のホバークラフトは鰻でいっぱいです'; @@ -59,7 +59,7 @@ final class CustomFieldTest extends TestCase } } - public function testDbNameKorean(): void + public function testDbNameKorean() { $customfield = new CustomField(); $customfield->name = '내 호버크라프트는 장어로 가득 차 있어요'; @@ -72,7 +72,7 @@ final class CustomFieldTest extends TestCase } // Nordic languages - public function testDbNameNonLatinEuro(): void + public function testDbNameNonLatinEuro() { $customfield = new CustomField(); $customfield->name = 'Mój poduszkowiec jest pełen węgorzy'; @@ -85,7 +85,7 @@ final class CustomFieldTest extends TestCase } // - public function testDbNameTurkish(): void + public function testDbNameTurkish() { $customfield = new CustomField(); $customfield->name = 'Hoverkraftım yılan balığı dolu'; @@ -97,7 +97,7 @@ final class CustomFieldTest extends TestCase } } - public function testDbNameArabic(): void + public function testDbNameArabic() { $customfield = new CustomField(); $customfield->name = 'حَوّامتي مُمْتِلئة بِأَنْقَلَيْسون'; diff --git a/tests/Unit/DepreciationTest.php b/tests/Unit/DepreciationTest.php index 566c29fe10..c622eaa92b 100644 --- a/tests/Unit/DepreciationTest.php +++ b/tests/Unit/DepreciationTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class DepreciationTest extends TestCase { - public function testADepreciationHasModels(): void + public function testADepreciationHasModels() { $depreciation = Depreciation::factory()->create(); @@ -26,7 +26,7 @@ final class DepreciationTest extends TestCase $this->assertEquals(5, $depreciation->models->count()); } - public function testADepreciationHasLicenses(): void + public function testADepreciationHasLicenses() { $depreciation = Depreciation::factory()->create(); diff --git a/tests/Unit/Helpers/HelperTest.php b/tests/Unit/Helpers/HelperTest.php index 82a71fd915..dc06887e73 100644 --- a/tests/Unit/Helpers/HelperTest.php +++ b/tests/Unit/Helpers/HelperTest.php @@ -10,17 +10,17 @@ use Tests\TestCase; final class HelperTest extends TestCase { - public function testDefaultChartColorsMethodHandlesHighValues(): void + public function testDefaultChartColorsMethodHandlesHighValues() { $this->assertIsString(Helper::defaultChartColors(1000)); } - public function testDefaultChartColorsMethodHandlesNegativeNumbers(): void + public function testDefaultChartColorsMethodHandlesNegativeNumbers() { $this->assertIsString(Helper::defaultChartColors(-1)); } - public function testParseCurrencyMethod(): void + public function testParseCurrencyMethod() { $this->settings->set(['default_currency' => 'USD']); $this->assertSame(12.34, Helper::ParseCurrency('USD 12.34')); @@ -28,7 +28,7 @@ final class HelperTest extends TestCase $this->settings->set(['digit_separator' => '1.234,56']); $this->assertSame(12.34, Helper::ParseCurrency('12,34')); } - public function testGetRedirectOptionMethod(): void + public function testGetRedirectOptionMethod() { $test_data = [ 'Option target: redirect for user assigned to ' => [ diff --git a/tests/Unit/LdapTest.php b/tests/Unit/LdapTest.php index f93c48be15..3e7b9d75fa 100644 --- a/tests/Unit/LdapTest.php +++ b/tests/Unit/LdapTest.php @@ -11,7 +11,7 @@ final class LdapTest extends TestCase { use \phpmock\phpunit\PHPMock; - public function testConnect(): void + public function testConnect() { $this->settings->enableLdap(); @@ -31,14 +31,14 @@ final class LdapTest extends TestCase // with/without ignore cert validation? // test (and mock) ldap_start_tls() ? - public function testBindAdmin(): void + public function testBindAdmin() { $this->settings->enableLdap(); $this->getFunctionMock("App\\Models", "ldap_bind")->expects($this->once())->willReturn(true); $this->assertNull(Ldap::bindAdminToLdap("dummy")); } - public function testBindBad(): void + public function testBindBad() { $this->settings->enableLdap(); $this->getFunctionMock("App\\Models", "ldap_bind")->expects($this->once())->willReturn(false); @@ -49,7 +49,7 @@ final class LdapTest extends TestCase } // other test cases - test donked password? - public function testAnonymousBind(): void + public function testAnonymousBind() { //todo - would be nice to introspect somehow to make sure the right parameters were passed? $this->settings->enableAnonymousLdap(); @@ -57,7 +57,7 @@ final class LdapTest extends TestCase $this->assertNull(Ldap::bindAdminToLdap("dummy")); } - public function testBadAnonymousBind(): void + public function testBadAnonymousBind() { $this->settings->enableAnonymousLdap(); $this->getFunctionMock("App\\Models", "ldap_bind")->expects($this->once())->willReturn(false); @@ -67,7 +67,7 @@ final class LdapTest extends TestCase $this->assertNull(Ldap::bindAdminToLdap("dummy")); } - public function testBadEncryptedPassword(): void + public function testBadEncryptedPassword() { $this->settings->enableBadPasswordLdap(); @@ -75,7 +75,7 @@ final class LdapTest extends TestCase $this->assertNull(Ldap::bindAdminToLdap("dummy")); } - public function testFindAndBind(): void + public function testFindAndBind() { $this->settings->enableLdap(); @@ -105,7 +105,7 @@ final class LdapTest extends TestCase $this->assertEqualsCanonicalizing(["count" =>1,0 =>['sn' => 'Surname','firstname' => 'FirstName']],$results); } - public function testFindAndBindBadPassword(): void + public function testFindAndBindBadPassword() { $this->settings->enableLdap(); @@ -126,7 +126,7 @@ final class LdapTest extends TestCase $this->assertFalse($results); } - public function testFindAndBindCannotFindSelf(): void + public function testFindAndBindCannotFindSelf() { $this->settings->enableLdap(); @@ -147,7 +147,7 @@ final class LdapTest extends TestCase //maybe should do an AD test as well? - public function testFindLdapUsers(): void + public function testFindLdapUsers() { $this->settings->enableLdap(); @@ -170,7 +170,7 @@ final class LdapTest extends TestCase $this->assertEqualsCanonicalizing(["count" => 1], $results); } - public function testFindLdapUsersPaginated(): void + public function testFindLdapUsersPaginated() { $this->settings->enableLdap(); diff --git a/tests/Unit/Listeners/LogListenerTest.php b/tests/Unit/Listeners/LogListenerTest.php index 3361886793..f5ab6d1393 100644 --- a/tests/Unit/Listeners/LogListenerTest.php +++ b/tests/Unit/Listeners/LogListenerTest.php @@ -10,7 +10,7 @@ use Tests\TestCase; final class LogListenerTest extends TestCase { - public function testLogsEntryOnCheckoutableCheckedOut(): void + public function testLogsEntryOnCheckoutableCheckedOut() { $asset = Asset::factory()->create(); $checkedOutTo = User::factory()->create(); diff --git a/tests/Unit/LocationTest.php b/tests/Unit/LocationTest.php index 1898d3f877..0c5f535b04 100644 --- a/tests/Unit/LocationTest.php +++ b/tests/Unit/LocationTest.php @@ -6,7 +6,7 @@ use Tests\TestCase; final class LocationTest extends TestCase { - public function testPassesIfNotSelfParent(): void + public function testPassesIfNotSelfParent() { $a = Location::factory()->make([ 'name' => 'Test Location', @@ -17,7 +17,7 @@ final class LocationTest extends TestCase $this->assertTrue($a->isValid()); } - public function testFailsIfSelfParent(): void + public function testFailsIfSelfParent() { $a = Location::factory()->make([ 'name' => 'Test Location', diff --git a/tests/Unit/Models/Company/CompanyTest.php b/tests/Unit/Models/Company/CompanyTest.php index 5d5cbd2a67..66836afd73 100644 --- a/tests/Unit/Models/Company/CompanyTest.php +++ b/tests/Unit/Models/Company/CompanyTest.php @@ -7,7 +7,7 @@ use Tests\TestCase; final class CompanyTest extends TestCase { - public function testACompanyCanHaveUsers(): void + public function testACompanyCanHaveUsers() { $company = Company::factory()->create(); $user = User::factory() diff --git a/tests/Unit/Models/Company/GetIdForCurrentUserTest.php b/tests/Unit/Models/Company/GetIdForCurrentUserTest.php index fff572c18c..7ef5b9595d 100644 --- a/tests/Unit/Models/Company/GetIdForCurrentUserTest.php +++ b/tests/Unit/Models/Company/GetIdForCurrentUserTest.php @@ -8,7 +8,7 @@ use Tests\TestCase; final class GetIdForCurrentUserTest extends TestCase { - public function testReturnsProvidedValueWhenFullCompanySupportDisabled(): void + public function testReturnsProvidedValueWhenFullCompanySupportDisabled() { $this->settings->disableMultipleFullCompanySupport(); @@ -16,7 +16,7 @@ final class GetIdForCurrentUserTest extends TestCase $this->assertEquals(1000, Company::getIdForCurrentUser(1000)); } - public function testReturnsProvidedValueForSuperUsersWhenFullCompanySupportEnabled(): void + public function testReturnsProvidedValueForSuperUsersWhenFullCompanySupportEnabled() { $this->settings->enableMultipleFullCompanySupport(); @@ -24,7 +24,7 @@ final class GetIdForCurrentUserTest extends TestCase $this->assertEquals(2000, Company::getIdForCurrentUser(2000)); } - public function testReturnsNonSuperUsersCompanyIdWhenFullCompanySupportEnabled(): void + public function testReturnsNonSuperUsersCompanyIdWhenFullCompanySupportEnabled() { $this->settings->enableMultipleFullCompanySupport(); @@ -32,7 +32,7 @@ final class GetIdForCurrentUserTest extends TestCase $this->assertEquals(2000, Company::getIdForCurrentUser(1000)); } - public function testReturnsProvidedValueForNonSuperUserWithoutCompanyIdWhenFullCompanySupportEnabled(): void + public function testReturnsProvidedValueForNonSuperUserWithoutCompanyIdWhenFullCompanySupportEnabled() { $this->settings->enableMultipleFullCompanySupport(); diff --git a/tests/Unit/Models/Labels/FieldOptionTest.php b/tests/Unit/Models/Labels/FieldOptionTest.php index 4eb0829cb3..45756daec2 100644 --- a/tests/Unit/Models/Labels/FieldOptionTest.php +++ b/tests/Unit/Models/Labels/FieldOptionTest.php @@ -9,7 +9,7 @@ use Tests\TestCase; final class FieldOptionTest extends TestCase { - public function testItDisplaysAssignedToProperly(): void + public function testItDisplaysAssignedToProperly() { // "assignedTo" is a "special" value that can be used in the new label engine $fieldOption = FieldOption::fromString('Assigned To=assignedTo'); diff --git a/tests/Unit/NotificationTest.php b/tests/Unit/NotificationTest.php index b636bff7a6..dbeaa44ca2 100644 --- a/tests/Unit/NotificationTest.php +++ b/tests/Unit/NotificationTest.php @@ -12,7 +12,7 @@ use Tests\TestCase; final class NotificationTest extends TestCase { - public function testAUserIsEmailedIfTheyCheckoutAnAssetWithEULA(): void + public function testAUserIsEmailedIfTheyCheckoutAnAssetWithEULA() { $admin = User::factory()->superuser()->create(); $user = User::factory()->create(); diff --git a/tests/Unit/SnipeModelTest.php b/tests/Unit/SnipeModelTest.php index 7a95655abd..3084aba1bd 100644 --- a/tests/Unit/SnipeModelTest.php +++ b/tests/Unit/SnipeModelTest.php @@ -6,7 +6,7 @@ use Tests\TestCase; final class SnipeModelTest extends TestCase { - public function testSetsPurchaseDatesAppropriately(): void + public function testSetsPurchaseDatesAppropriately() { $c = new SnipeModel; $c->purchase_date = ''; @@ -15,7 +15,7 @@ final class SnipeModelTest extends TestCase $this->assertTrue($c->purchase_date === '2016-03-25 12:35:50'); } - public function testSetsPurchaseCostsAppropriately(): void + public function testSetsPurchaseCostsAppropriately() { $c = new SnipeModel; $c->purchase_cost = '0.00'; @@ -26,7 +26,7 @@ final class SnipeModelTest extends TestCase $this->assertTrue($c->purchase_cost === 9.5); } - public function testNullsBlankLocationIdsButNotOthers(): void + public function testNullsBlankLocationIdsButNotOthers() { $c = new SnipeModel; $c->location_id = ''; @@ -35,7 +35,7 @@ final class SnipeModelTest extends TestCase $this->assertTrue($c->location_id == 5); } - public function testNullsBlankCategoriesButNotOthers(): void + public function testNullsBlankCategoriesButNotOthers() { $c = new SnipeModel; $c->category_id = ''; @@ -44,7 +44,7 @@ final class SnipeModelTest extends TestCase $this->assertTrue($c->category_id == 1); } - public function testNullsBlankSuppliersButNotOthers(): void + public function testNullsBlankSuppliersButNotOthers() { $c = new SnipeModel; $c->supplier_id = ''; @@ -53,7 +53,7 @@ final class SnipeModelTest extends TestCase $this->assertTrue($c->supplier_id == 4); } - public function testNullsBlankDepreciationsButNotOthers(): void + public function testNullsBlankDepreciationsButNotOthers() { $c = new SnipeModel; $c->depreciation_id = ''; @@ -62,7 +62,7 @@ final class SnipeModelTest extends TestCase $this->assertTrue($c->depreciation_id == 4); } - public function testNullsBlankManufacturersButNotOthers(): void + public function testNullsBlankManufacturersButNotOthers() { $c = new SnipeModel; $c->manufacturer_id = ''; diff --git a/tests/Unit/SnipeTranslatorTest.php b/tests/Unit/SnipeTranslatorTest.php index 6a582d0735..c8f10b7621 100644 --- a/tests/Unit/SnipeTranslatorTest.php +++ b/tests/Unit/SnipeTranslatorTest.php @@ -11,17 +11,17 @@ final class SnipeTranslatorTest extends TestCase // WARNING: If these translation strings are updated, these tests will start to fail. Update them as appropriate. - public function testBasic(): void + public function testBasic() { $this->assertEquals('This user has admin privileges',trans('general.admin_tooltip',[],'en-US')); } - public function testPortuguese(): void + public function testPortuguese() { $this->assertEquals('Acessório',trans('general.accessory',[],'pt-PT')); } - public function testFallback(): void + public function testFallback() { $this->assertEquals( 'This user has admin privileges', @@ -30,7 +30,7 @@ final class SnipeTranslatorTest extends TestCase ); } - public function testBackupString(): void + public function testBackupString() { $this->assertEquals( 'Ingen sikkerhetskopier ble gjort ennå', @@ -39,7 +39,7 @@ final class SnipeTranslatorTest extends TestCase ); } - public function testBackupFallback(): void + public function testBackupFallback() { $this->assertEquals( 'No backups were made yet', @@ -49,7 +49,7 @@ final class SnipeTranslatorTest extends TestCase } - public function testTransChoiceSingular(): void + public function testTransChoiceSingular() { $this->assertEquals( '1 Consumível', @@ -57,7 +57,7 @@ final class SnipeTranslatorTest extends TestCase ); } - public function testTransChoicePlural(): void + public function testTransChoicePlural() { $this->assertEquals( '2 Consumíveis', @@ -65,7 +65,7 @@ final class SnipeTranslatorTest extends TestCase ); } - public function testTotallyBogusKey(): void + public function testTotallyBogusKey() { $this->assertEquals( 'bogus_key', @@ -74,7 +74,7 @@ final class SnipeTranslatorTest extends TestCase ); } - public function testReplacements(): void { + public function testReplacements() { $this->assertEquals( 'Artigos alocados a Some Name Here', trans('admin/users/general.assets_user',['name' => 'Some Name Here'],'pt-PT'), @@ -82,7 +82,7 @@ final class SnipeTranslatorTest extends TestCase ); } - public function testNonlegacyBackupLocale(): void { + public function testNonlegacyBackupLocale() { //Spatie backup *usually* uses two-character locales, but pt-BR is an exception $this->assertEquals( 'Mensagem de exceção: MESSAGE', diff --git a/tests/Unit/StatuslabelTest.php b/tests/Unit/StatuslabelTest.php index dc57831fa3..71e74ababe 100644 --- a/tests/Unit/StatuslabelTest.php +++ b/tests/Unit/StatuslabelTest.php @@ -6,37 +6,37 @@ use Tests\TestCase; final class StatuslabelTest extends TestCase { - public function testRTDStatuslabelAdd(): void + public function testRTDStatuslabelAdd() { $statuslabel = Statuslabel::factory()->rtd()->create(); $this->assertModelExists($statuslabel); } - public function testPendingStatuslabelAdd(): void + public function testPendingStatuslabelAdd() { $statuslabel = Statuslabel::factory()->pending()->create(); $this->assertModelExists($statuslabel); } - public function testArchivedStatuslabelAdd(): void + public function testArchivedStatuslabelAdd() { $statuslabel = Statuslabel::factory()->archived()->create(); $this->assertModelExists($statuslabel); } - public function testOutForRepairStatuslabelAdd(): void + public function testOutForRepairStatuslabelAdd() { $statuslabel = Statuslabel::factory()->outForRepair()->create(); $this->assertModelExists($statuslabel); } - public function testBrokenStatuslabelAdd(): void + public function testBrokenStatuslabelAdd() { $statuslabel = Statuslabel::factory()->broken()->create(); $this->assertModelExists($statuslabel); } - public function testLostStatuslabelAdd(): void + public function testLostStatuslabelAdd() { $statuslabel = Statuslabel::factory()->lost()->create(); $this->assertModelExists($statuslabel); diff --git a/tests/Unit/UserTest.php b/tests/Unit/UserTest.php index 1d32bc83e9..1681fac942 100644 --- a/tests/Unit/UserTest.php +++ b/tests/Unit/UserTest.php @@ -6,7 +6,7 @@ use Tests\TestCase; final class UserTest extends TestCase { - public function testFirstNameSplit(): void + public function testFirstNameSplit() { $fullname = "Natalia Allanovna Romanova-O'Shostakova"; $expected_firstname = 'Natalia'; @@ -16,7 +16,7 @@ final class UserTest extends TestCase $this->assertEquals($expected_lastname, $user['last_name']); } - public function testFirstName(): void + public function testFirstName() { $fullname = "Natalia Allanovna Romanova-O'Shostakova"; $expected_username = 'natalia'; @@ -24,7 +24,7 @@ final class UserTest extends TestCase $this->assertEquals($expected_username, $user['username']); } - public function testFirstNameDotLastName(): void + public function testFirstNameDotLastName() { $fullname = "Natalia Allanovna Romanova-O'Shostakova"; $expected_username = 'natalia.allanovna-romanova-oshostakova'; @@ -32,7 +32,7 @@ final class UserTest extends TestCase $this->assertEquals($expected_username, $user['username']); } - public function testLastNameFirstInitial(): void + public function testLastNameFirstInitial() { $fullname = "Natalia Allanovna Romanova-O'Shostakova"; $expected_username = 'allanovna-romanova-oshostakovan'; @@ -40,7 +40,7 @@ final class UserTest extends TestCase $this->assertEquals($expected_username, $user['username']); } - public function testFirstInitialLastName(): void + public function testFirstInitialLastName() { $fullname = "Natalia Allanovna Romanova-O'Shostakova"; $expected_username = 'nallanovna-romanova-oshostakova'; @@ -48,7 +48,7 @@ final class UserTest extends TestCase $this->assertEquals($expected_username, $user['username']); } - public function testFirstInitialUnderscoreLastName(): void + public function testFirstInitialUnderscoreLastName() { $fullname = "Natalia Allanovna Romanova-O'Shostakova"; $expected_username = 'nallanovna-romanova-oshostakova'; @@ -56,7 +56,7 @@ final class UserTest extends TestCase $this->assertEquals($expected_username, $user['username']); } - public function testSingleName(): void + public function testSingleName() { $fullname = 'Natalia'; $expected_username = 'natalia'; From 3e832e5e941feff7df9b0eeade0c76a6c31420ce Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Tue, 6 Aug 2024 13:31:17 -0700 Subject: [PATCH 08/12] Revert "Define test classes as `final`" This reverts commit 95516b0343aa5755a95b330fcf4c5c3ccefedc69. --- tests/Feature/AssetModels/Api/CreateAssetModelsTest.php | 2 +- tests/Feature/AssetModels/Api/IndexAssetModelsTest.php | 2 +- tests/Feature/AssetModels/Api/UpdateAssetModelsTest.php | 2 +- tests/Feature/AssetModels/Ui/CreateAssetModelsTest.php | 2 +- tests/Feature/AssetModels/Ui/IndexAssetModelsTest.php | 2 +- tests/Feature/AssetModels/Ui/UpdateAssetModelsTest.php | 2 +- tests/Feature/Assets/Api/AssetFilesTest.php | 2 +- tests/Feature/Assets/Api/AssetIndexTest.php | 2 +- tests/Feature/Assets/Api/AssetsForSelectListTest.php | 2 +- tests/Feature/Assets/Api/RequestableAssetTest.php | 2 +- tests/Feature/Assets/Api/StoreAssetTest.php | 2 +- tests/Feature/Assets/Api/UpdateAssetTest.php | 2 +- tests/Feature/Assets/Ui/BulkDeleteAssetsTest.php | 2 +- tests/Feature/Assets/Ui/BulkEditAssetsTest.php | 2 +- tests/Feature/Assets/Ui/CloneAssetTest.php | 2 +- tests/Feature/Assets/Ui/EditAssetTest.php | 2 +- tests/Feature/Categories/Api/CreateCategoriesTest.php | 2 +- tests/Feature/Categories/Api/IndexCategoriesTest.php | 2 +- tests/Feature/Categories/Api/UpdateCategoriesTest.php | 2 +- tests/Feature/Categories/Ui/CreateCategoriesTest.php | 2 +- tests/Feature/Categories/Ui/IndexCategoriesTest.php | 2 +- tests/Feature/Categories/Ui/UpdateCategoriesTest.php | 2 +- tests/Feature/Checkins/Api/AssetCheckinTest.php | 2 +- tests/Feature/Checkins/Ui/AccessoryCheckinTest.php | 2 +- tests/Feature/Checkins/Ui/AssetCheckinTest.php | 2 +- tests/Feature/Checkins/Ui/ComponentCheckinTest.php | 2 +- tests/Feature/Checkins/Ui/LicenseCheckinTest.php | 2 +- .../Feature/CheckoutAcceptances/Ui/AccessoryAcceptanceTest.php | 2 +- tests/Feature/Checkouts/Api/AccessoryCheckoutTest.php | 2 +- tests/Feature/Checkouts/Api/AssetCheckoutTest.php | 2 +- tests/Feature/Checkouts/Api/ConsumableCheckoutTest.php | 2 +- tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php | 2 +- tests/Feature/Checkouts/Ui/AssetCheckoutTest.php | 2 +- tests/Feature/Checkouts/Ui/ComponentsCheckoutTest.php | 2 +- tests/Feature/Checkouts/Ui/ConsumableCheckoutTest.php | 2 +- tests/Feature/Checkouts/Ui/LicenseCheckoutTest.php | 2 +- tests/Feature/Components/Api/ComponentIndexTest.php | 2 +- tests/Feature/Components/Ui/ComponentIndexTest.php | 2 +- tests/Feature/Console/MergeUsersTest.php | 2 +- tests/Feature/Console/OptimizeTest.php | 2 +- tests/Feature/Consumables/Api/ConsumableIndexTest.php | 2 +- tests/Feature/Consumables/Api/ConsumableUpdateTest.php | 2 +- tests/Feature/Consumables/Api/ConsumableViewTest.php | 2 +- tests/Feature/Consumables/Ui/ConsumableIndexTest.php | 2 +- tests/Feature/Consumables/Ui/ConsumableViewTest.php | 2 +- tests/Feature/DashboardTest.php | 2 +- tests/Feature/Departments/Api/CreateDepartmentsTest.php | 2 +- tests/Feature/Departments/Api/DepartmentsIndexTest.php | 2 +- tests/Feature/Departments/Api/UpdateDepartmentsTest.php | 2 +- tests/Feature/Departments/Ui/CreateDepartmentsTest.php | 2 +- tests/Feature/Departments/Ui/IndexDepartmentsTest.php | 2 +- tests/Feature/Departments/Ui/UpdateDepartmentsTest.php | 2 +- tests/Feature/Groups/Api/StoreGroupTest.php | 2 +- tests/Feature/Groups/Ui/IndexGroupTest.php | 2 +- tests/Feature/Licenses/Api/LicenseIndexTest.php | 2 +- tests/Feature/Licenses/Ui/CreateLicenseTest.php | 2 +- tests/Feature/Licenses/Ui/LicenseIndexTest.php | 2 +- tests/Feature/Licenses/Ui/LicenseViewTest.php | 2 +- tests/Feature/Livewire/CategoryEditFormTest.php | 2 +- tests/Feature/Locations/Api/CreateLocationsTest.php | 2 +- tests/Feature/Locations/Api/DeleteLocationsTest.php | 2 +- tests/Feature/Locations/Api/IndexLocationsTest.php | 2 +- tests/Feature/Locations/Api/LocationsForSelectListTest.php | 2 +- tests/Feature/Locations/Api/LocationsViewTest.php | 2 +- tests/Feature/Locations/Api/UpdateLocationsTest.php | 2 +- tests/Feature/Locations/Ui/CreateLocationsTest.php | 2 +- tests/Feature/Locations/Ui/IndexLocationsTest.php | 2 +- tests/Feature/Locations/Ui/UpdateLocationsTest.php | 2 +- .../Notifications/Email/EmailNotificationsUponCheckinTest.php | 2 +- .../Webhooks/SlackNotificationsUponCheckinTest.php | 2 +- .../Webhooks/SlackNotificationsUponCheckoutTest.php | 2 +- tests/Feature/Reporting/CustomReportTest.php | 2 +- tests/Feature/Reporting/UnacceptedAssetReportTest.php | 2 +- tests/Feature/Settings/BrandingSettingsTest.php | 2 +- tests/Feature/Settings/ShowSetUpPageTest.php | 2 +- tests/Feature/Users/Api/DeleteUserTest.php | 2 +- tests/Feature/Users/Api/RestoreUserTest.php | 2 +- tests/Feature/Users/Api/UpdateUserTest.php | 2 +- tests/Feature/Users/Api/UserSearchTest.php | 2 +- tests/Feature/Users/Api/UsersForSelectListTest.php | 2 +- tests/Feature/Users/Api/ViewUserTest.php | 2 +- tests/Feature/Users/Ui/DeleteUserTest.php | 2 +- tests/Feature/Users/Ui/MergeUsersTest.php | 2 +- tests/Feature/Users/Ui/UpdateUserTest.php | 2 +- tests/Feature/Users/Ui/ViewUserTest.php | 2 +- tests/Unit/AccessoryTest.php | 2 +- tests/Unit/AssetMaintenanceTest.php | 2 +- tests/Unit/AssetModelTest.php | 2 +- tests/Unit/AssetTest.php | 2 +- tests/Unit/CategoryTest.php | 2 +- tests/Unit/CompanyScopingTest.php | 2 +- tests/Unit/ComponentTest.php | 2 +- tests/Unit/CustomFieldTest.php | 2 +- tests/Unit/DepreciationTest.php | 2 +- tests/Unit/Helpers/HelperTest.php | 2 +- tests/Unit/LdapTest.php | 2 +- tests/Unit/Listeners/LogListenerTest.php | 2 +- tests/Unit/LocationTest.php | 2 +- tests/Unit/Models/Company/CompanyTest.php | 2 +- tests/Unit/Models/Company/GetIdForCurrentUserTest.php | 2 +- tests/Unit/Models/Labels/FieldOptionTest.php | 2 +- tests/Unit/NotificationTest.php | 2 +- tests/Unit/SnipeModelTest.php | 2 +- tests/Unit/SnipeTranslatorTest.php | 2 +- tests/Unit/StatuslabelTest.php | 2 +- tests/Unit/UserTest.php | 2 +- 106 files changed, 106 insertions(+), 106 deletions(-) diff --git a/tests/Feature/AssetModels/Api/CreateAssetModelsTest.php b/tests/Feature/AssetModels/Api/CreateAssetModelsTest.php index cc072505a9..a0b1c27b73 100644 --- a/tests/Feature/AssetModels/Api/CreateAssetModelsTest.php +++ b/tests/Feature/AssetModels/Api/CreateAssetModelsTest.php @@ -8,7 +8,7 @@ use App\Models\User; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -final class CreateAssetModelsTest extends TestCase +class CreateAssetModelsTest extends TestCase { diff --git a/tests/Feature/AssetModels/Api/IndexAssetModelsTest.php b/tests/Feature/AssetModels/Api/IndexAssetModelsTest.php index 6afa23c939..26e4dd75b1 100644 --- a/tests/Feature/AssetModels/Api/IndexAssetModelsTest.php +++ b/tests/Feature/AssetModels/Api/IndexAssetModelsTest.php @@ -8,7 +8,7 @@ use App\Models\User; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -final class IndexAssetModelsTest extends TestCase +class IndexAssetModelsTest extends TestCase { public function testViewingAssetModelIndexRequiresAuthentication() { diff --git a/tests/Feature/AssetModels/Api/UpdateAssetModelsTest.php b/tests/Feature/AssetModels/Api/UpdateAssetModelsTest.php index 16401c3851..c5ec212650 100644 --- a/tests/Feature/AssetModels/Api/UpdateAssetModelsTest.php +++ b/tests/Feature/AssetModels/Api/UpdateAssetModelsTest.php @@ -7,7 +7,7 @@ use App\Models\Category; use App\Models\User; use Tests\TestCase; -final class UpdateAssetModelsTest extends TestCase +class UpdateAssetModelsTest extends TestCase { public function testRequiresPermissionToEditAssetModel() diff --git a/tests/Feature/AssetModels/Ui/CreateAssetModelsTest.php b/tests/Feature/AssetModels/Ui/CreateAssetModelsTest.php index 37c5fce398..ef35aa5f6c 100644 --- a/tests/Feature/AssetModels/Ui/CreateAssetModelsTest.php +++ b/tests/Feature/AssetModels/Ui/CreateAssetModelsTest.php @@ -7,7 +7,7 @@ use App\Models\Category; use App\Models\User; use Tests\TestCase; -final class CreateAssetModelsTest extends TestCase +class CreateAssetModelsTest extends TestCase { public function testPermissionRequiredToCreateAssetModel() { diff --git a/tests/Feature/AssetModels/Ui/IndexAssetModelsTest.php b/tests/Feature/AssetModels/Ui/IndexAssetModelsTest.php index e2a65ae131..495de30f0a 100644 --- a/tests/Feature/AssetModels/Ui/IndexAssetModelsTest.php +++ b/tests/Feature/AssetModels/Ui/IndexAssetModelsTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature\AssetModels\Ui; use App\Models\User; use Tests\TestCase; -final class IndexAssetModelsTest extends TestCase +class IndexAssetModelsTest extends TestCase { public function testPermissionRequiredToViewAssetModelList() { diff --git a/tests/Feature/AssetModels/Ui/UpdateAssetModelsTest.php b/tests/Feature/AssetModels/Ui/UpdateAssetModelsTest.php index 3d459413bb..423eaad574 100644 --- a/tests/Feature/AssetModels/Ui/UpdateAssetModelsTest.php +++ b/tests/Feature/AssetModels/Ui/UpdateAssetModelsTest.php @@ -7,7 +7,7 @@ use App\Models\Category; use App\Models\User; use Tests\TestCase; -final class UpdateAssetModelsTest extends TestCase +class UpdateAssetModelsTest extends TestCase { public function testPermissionRequiredToStoreAssetModel() { diff --git a/tests/Feature/Assets/Api/AssetFilesTest.php b/tests/Feature/Assets/Api/AssetFilesTest.php index 136e90aa28..bc5b6043e4 100644 --- a/tests/Feature/Assets/Api/AssetFilesTest.php +++ b/tests/Feature/Assets/Api/AssetFilesTest.php @@ -7,7 +7,7 @@ use App\Models\User; use Illuminate\Http\UploadedFile; use Tests\TestCase; -final class AssetFilesTest extends TestCase +class AssetFilesTest extends TestCase { public function testAssetApiAcceptsFileUpload() { diff --git a/tests/Feature/Assets/Api/AssetIndexTest.php b/tests/Feature/Assets/Api/AssetIndexTest.php index 797499137d..c4a362d28b 100644 --- a/tests/Feature/Assets/Api/AssetIndexTest.php +++ b/tests/Feature/Assets/Api/AssetIndexTest.php @@ -9,7 +9,7 @@ use Carbon\Carbon; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -final class AssetIndexTest extends TestCase +class AssetIndexTest extends TestCase { public function testAssetApiIndexReturnsExpectedAssets() { diff --git a/tests/Feature/Assets/Api/AssetsForSelectListTest.php b/tests/Feature/Assets/Api/AssetsForSelectListTest.php index a44996f63b..de797651e4 100644 --- a/tests/Feature/Assets/Api/AssetsForSelectListTest.php +++ b/tests/Feature/Assets/Api/AssetsForSelectListTest.php @@ -7,7 +7,7 @@ use App\Models\Company; use App\Models\User; use Tests\TestCase; -final class AssetsForSelectListTest extends TestCase +class AssetsForSelectListTest extends TestCase { public function testAssetsCanBeSearchedForByAssetTag() { diff --git a/tests/Feature/Assets/Api/RequestableAssetTest.php b/tests/Feature/Assets/Api/RequestableAssetTest.php index 9fc81a5ff3..d24913ad66 100644 --- a/tests/Feature/Assets/Api/RequestableAssetTest.php +++ b/tests/Feature/Assets/Api/RequestableAssetTest.php @@ -7,7 +7,7 @@ use App\Models\Company; use App\Models\User; use Tests\TestCase; -final class RequestableAssetTest extends TestCase +class RequestableAssetTest extends TestCase { public function testViewingRequestableAssetsRequiresCorrectPermission() { diff --git a/tests/Feature/Assets/Api/StoreAssetTest.php b/tests/Feature/Assets/Api/StoreAssetTest.php index 437c456a67..a3f5981635 100644 --- a/tests/Feature/Assets/Api/StoreAssetTest.php +++ b/tests/Feature/Assets/Api/StoreAssetTest.php @@ -14,7 +14,7 @@ use Illuminate\Support\Facades\Crypt; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -final class StoreAssetTest extends TestCase +class StoreAssetTest extends TestCase { public function testRequiresPermissionToCreateAsset() { diff --git a/tests/Feature/Assets/Api/UpdateAssetTest.php b/tests/Feature/Assets/Api/UpdateAssetTest.php index f58c26b051..db5893b4dc 100644 --- a/tests/Feature/Assets/Api/UpdateAssetTest.php +++ b/tests/Feature/Assets/Api/UpdateAssetTest.php @@ -13,7 +13,7 @@ use App\Models\CustomField; use Illuminate\Support\Facades\Crypt; use Tests\TestCase; -final class UpdateAssetTest extends TestCase +class UpdateAssetTest extends TestCase { public function testThatANonExistentAssetIdReturnsError() { diff --git a/tests/Feature/Assets/Ui/BulkDeleteAssetsTest.php b/tests/Feature/Assets/Ui/BulkDeleteAssetsTest.php index 26478d37fd..d1375c5393 100644 --- a/tests/Feature/Assets/Ui/BulkDeleteAssetsTest.php +++ b/tests/Feature/Assets/Ui/BulkDeleteAssetsTest.php @@ -8,7 +8,7 @@ use App\Models\Asset; use App\Models\User; use Tests\TestCase; -final class BulkDeleteAssetsTest extends TestCase +class BulkDeleteAssetsTest extends TestCase { public function testUserWithPermissionsCanAccessPage() { diff --git a/tests/Feature/Assets/Ui/BulkEditAssetsTest.php b/tests/Feature/Assets/Ui/BulkEditAssetsTest.php index d4253d4c77..02d39a7b45 100644 --- a/tests/Feature/Assets/Ui/BulkEditAssetsTest.php +++ b/tests/Feature/Assets/Ui/BulkEditAssetsTest.php @@ -12,7 +12,7 @@ use App\Models\User; use Illuminate\Support\Facades\Crypt; use Tests\TestCase; -final class BulkEditAssetsTest extends TestCase +class BulkEditAssetsTest extends TestCase { public function testUserWithPermissionsCanAccessPage() { diff --git a/tests/Feature/Assets/Ui/CloneAssetTest.php b/tests/Feature/Assets/Ui/CloneAssetTest.php index 7247276005..18e1ccc5e5 100644 --- a/tests/Feature/Assets/Ui/CloneAssetTest.php +++ b/tests/Feature/Assets/Ui/CloneAssetTest.php @@ -6,7 +6,7 @@ use App\Models\Asset; use App\Models\User; use Tests\TestCase; -final class CloneAssetTest extends TestCase +class CloneAssetTest extends TestCase { public function testPermissionRequiredToCreateAssetModel() { diff --git a/tests/Feature/Assets/Ui/EditAssetTest.php b/tests/Feature/Assets/Ui/EditAssetTest.php index bb2eb8de4b..2c19e768b4 100644 --- a/tests/Feature/Assets/Ui/EditAssetTest.php +++ b/tests/Feature/Assets/Ui/EditAssetTest.php @@ -8,7 +8,7 @@ use App\Models\StatusLabel; use App\Models\User; use Tests\TestCase; -final class EditAssetTest extends TestCase +class EditAssetTest extends TestCase { public function testPermissionRequiredToViewLicense() diff --git a/tests/Feature/Categories/Api/CreateCategoriesTest.php b/tests/Feature/Categories/Api/CreateCategoriesTest.php index 8c9b47992b..fc464242af 100644 --- a/tests/Feature/Categories/Api/CreateCategoriesTest.php +++ b/tests/Feature/Categories/Api/CreateCategoriesTest.php @@ -9,7 +9,7 @@ use App\Models\User; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -final class CreateCategoriesTest extends TestCase +class CreateCategoriesTest extends TestCase { diff --git a/tests/Feature/Categories/Api/IndexCategoriesTest.php b/tests/Feature/Categories/Api/IndexCategoriesTest.php index 139ec12067..d27bfbb068 100644 --- a/tests/Feature/Categories/Api/IndexCategoriesTest.php +++ b/tests/Feature/Categories/Api/IndexCategoriesTest.php @@ -7,7 +7,7 @@ use App\Models\User; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -final class IndexCategoriesTest extends TestCase +class IndexCategoriesTest extends TestCase { public function testViewingCategoryIndexRequiresPermission() diff --git a/tests/Feature/Categories/Api/UpdateCategoriesTest.php b/tests/Feature/Categories/Api/UpdateCategoriesTest.php index 8a8923930b..1a784c1179 100644 --- a/tests/Feature/Categories/Api/UpdateCategoriesTest.php +++ b/tests/Feature/Categories/Api/UpdateCategoriesTest.php @@ -6,7 +6,7 @@ use App\Models\Category; use App\Models\User; use Tests\TestCase; -final class UpdateCategoriesTest extends TestCase +class UpdateCategoriesTest extends TestCase { public function testCanUpdateCategoryViaPatchWithoutCategoryType() diff --git a/tests/Feature/Categories/Ui/CreateCategoriesTest.php b/tests/Feature/Categories/Ui/CreateCategoriesTest.php index 4471c7647c..87312ad257 100644 --- a/tests/Feature/Categories/Ui/CreateCategoriesTest.php +++ b/tests/Feature/Categories/Ui/CreateCategoriesTest.php @@ -7,7 +7,7 @@ use App\Models\Category; use App\Models\User; use Tests\TestCase; -final class CreateCategoriesTest extends TestCase +class CreateCategoriesTest extends TestCase { public function testPermissionRequiredToCreateCategories() { diff --git a/tests/Feature/Categories/Ui/IndexCategoriesTest.php b/tests/Feature/Categories/Ui/IndexCategoriesTest.php index 7f740f3328..caacba99a9 100644 --- a/tests/Feature/Categories/Ui/IndexCategoriesTest.php +++ b/tests/Feature/Categories/Ui/IndexCategoriesTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature\Categories\Ui; use App\Models\User; use Tests\TestCase; -final class IndexCategoriesTest extends TestCase +class IndexCategoriesTest extends TestCase { public function testPermissionRequiredToViewCategoryList() { diff --git a/tests/Feature/Categories/Ui/UpdateCategoriesTest.php b/tests/Feature/Categories/Ui/UpdateCategoriesTest.php index fd2e474462..98b67c7d32 100644 --- a/tests/Feature/Categories/Ui/UpdateCategoriesTest.php +++ b/tests/Feature/Categories/Ui/UpdateCategoriesTest.php @@ -7,7 +7,7 @@ use App\Models\Asset; use App\Models\User; use Tests\TestCase; -final class UpdateCategoriesTest extends TestCase +class UpdateCategoriesTest extends TestCase { public function testPermissionRequiredToStoreCategory() { diff --git a/tests/Feature/Checkins/Api/AssetCheckinTest.php b/tests/Feature/Checkins/Api/AssetCheckinTest.php index 42f6834217..0e041fc73a 100644 --- a/tests/Feature/Checkins/Api/AssetCheckinTest.php +++ b/tests/Feature/Checkins/Api/AssetCheckinTest.php @@ -13,7 +13,7 @@ use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Event; use Tests\TestCase; -final class AssetCheckinTest extends TestCase +class AssetCheckinTest extends TestCase { public function testCheckingInAssetRequiresCorrectPermission() { diff --git a/tests/Feature/Checkins/Ui/AccessoryCheckinTest.php b/tests/Feature/Checkins/Ui/AccessoryCheckinTest.php index 9084275d98..7a99b2ab56 100644 --- a/tests/Feature/Checkins/Ui/AccessoryCheckinTest.php +++ b/tests/Feature/Checkins/Ui/AccessoryCheckinTest.php @@ -10,7 +10,7 @@ use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Notification; use Tests\TestCase; -final class AccessoryCheckinTest extends TestCase +class AccessoryCheckinTest extends TestCase { public function testCheckingInAccessoryRequiresCorrectPermission() { diff --git a/tests/Feature/Checkins/Ui/AssetCheckinTest.php b/tests/Feature/Checkins/Ui/AssetCheckinTest.php index 1f6c20903a..f412d4439e 100644 --- a/tests/Feature/Checkins/Ui/AssetCheckinTest.php +++ b/tests/Feature/Checkins/Ui/AssetCheckinTest.php @@ -13,7 +13,7 @@ use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Event; use Tests\TestCase; -final class AssetCheckinTest extends TestCase +class AssetCheckinTest extends TestCase { public function testCheckingInAssetRequiresCorrectPermission() { diff --git a/tests/Feature/Checkins/Ui/ComponentCheckinTest.php b/tests/Feature/Checkins/Ui/ComponentCheckinTest.php index 721c00bf93..1213d65252 100644 --- a/tests/Feature/Checkins/Ui/ComponentCheckinTest.php +++ b/tests/Feature/Checkins/Ui/ComponentCheckinTest.php @@ -6,7 +6,7 @@ use App\Models\Component; use App\Models\User; use Tests\TestCase; -final class ComponentCheckinTest extends TestCase +class ComponentCheckinTest extends TestCase { public function testCheckingInComponentRequiresCorrectPermission() { diff --git a/tests/Feature/Checkins/Ui/LicenseCheckinTest.php b/tests/Feature/Checkins/Ui/LicenseCheckinTest.php index 4d93114e0f..e087cb442d 100644 --- a/tests/Feature/Checkins/Ui/LicenseCheckinTest.php +++ b/tests/Feature/Checkins/Ui/LicenseCheckinTest.php @@ -6,7 +6,7 @@ use App\Models\LicenseSeat; use App\Models\User; use Tests\TestCase; -final class LicenseCheckinTest extends TestCase +class LicenseCheckinTest extends TestCase { public function testCheckingInLicenseRequiresCorrectPermission() { diff --git a/tests/Feature/CheckoutAcceptances/Ui/AccessoryAcceptanceTest.php b/tests/Feature/CheckoutAcceptances/Ui/AccessoryAcceptanceTest.php index 99686d898d..fef38623f8 100644 --- a/tests/Feature/CheckoutAcceptances/Ui/AccessoryAcceptanceTest.php +++ b/tests/Feature/CheckoutAcceptances/Ui/AccessoryAcceptanceTest.php @@ -11,7 +11,7 @@ use App\Notifications\AcceptanceAssetDeclinedNotification; use Illuminate\Support\Facades\Notification; use Tests\TestCase; -final class AccessoryAcceptanceTest extends TestCase +class AccessoryAcceptanceTest extends TestCase { /** * This can be absorbed into a bigger test diff --git a/tests/Feature/Checkouts/Api/AccessoryCheckoutTest.php b/tests/Feature/Checkouts/Api/AccessoryCheckoutTest.php index bbebae56b0..2b37797fb6 100644 --- a/tests/Feature/Checkouts/Api/AccessoryCheckoutTest.php +++ b/tests/Feature/Checkouts/Api/AccessoryCheckoutTest.php @@ -9,7 +9,7 @@ use App\Notifications\CheckoutAccessoryNotification; use Illuminate\Support\Facades\Notification; use Tests\TestCase; -final class AccessoryCheckoutTest extends TestCase +class AccessoryCheckoutTest extends TestCase { public function testCheckingOutAccessoryRequiresCorrectPermission() { diff --git a/tests/Feature/Checkouts/Api/AssetCheckoutTest.php b/tests/Feature/Checkouts/Api/AssetCheckoutTest.php index 8f8d1a9c74..ded3889642 100644 --- a/tests/Feature/Checkouts/Api/AssetCheckoutTest.php +++ b/tests/Feature/Checkouts/Api/AssetCheckoutTest.php @@ -12,7 +12,7 @@ use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Event; use Tests\TestCase; -final class AssetCheckoutTest extends TestCase +class AssetCheckoutTest extends TestCase { protected function setUp(): void { diff --git a/tests/Feature/Checkouts/Api/ConsumableCheckoutTest.php b/tests/Feature/Checkouts/Api/ConsumableCheckoutTest.php index 915fba056e..3bd0212fda 100644 --- a/tests/Feature/Checkouts/Api/ConsumableCheckoutTest.php +++ b/tests/Feature/Checkouts/Api/ConsumableCheckoutTest.php @@ -9,7 +9,7 @@ use App\Notifications\CheckoutConsumableNotification; use Illuminate\Support\Facades\Notification; use Tests\TestCase; -final class ConsumableCheckoutTest extends TestCase +class ConsumableCheckoutTest extends TestCase { public function testCheckingOutConsumableRequiresCorrectPermission() { diff --git a/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php b/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php index 222802079f..d4818ffc4b 100644 --- a/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/AccessoryCheckoutTest.php @@ -11,7 +11,7 @@ use App\Notifications\CheckoutAccessoryNotification; use Illuminate\Support\Facades\Notification; use Tests\TestCase; -final class AccessoryCheckoutTest extends TestCase +class AccessoryCheckoutTest extends TestCase { public function testCheckingOutAccessoryRequiresCorrectPermission() { diff --git a/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php b/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php index 21be6e35b8..f268a9385e 100644 --- a/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php @@ -15,7 +15,7 @@ use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Event; use Tests\TestCase; -final class AssetCheckoutTest extends TestCase +class AssetCheckoutTest extends TestCase { protected function setUp(): void { diff --git a/tests/Feature/Checkouts/Ui/ComponentsCheckoutTest.php b/tests/Feature/Checkouts/Ui/ComponentsCheckoutTest.php index ab79388677..da285bebbb 100644 --- a/tests/Feature/Checkouts/Ui/ComponentsCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/ComponentsCheckoutTest.php @@ -7,7 +7,7 @@ use App\Models\Component; use App\Models\User; use Tests\TestCase; -final class ComponentsCheckoutTest extends TestCase +class ComponentsCheckoutTest extends TestCase { public function testCheckingOutComponentRequiresCorrectPermission() { diff --git a/tests/Feature/Checkouts/Ui/ConsumableCheckoutTest.php b/tests/Feature/Checkouts/Ui/ConsumableCheckoutTest.php index f85031ccd3..90132fcedf 100644 --- a/tests/Feature/Checkouts/Ui/ConsumableCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/ConsumableCheckoutTest.php @@ -11,7 +11,7 @@ use App\Notifications\CheckoutConsumableNotification; use Illuminate\Support\Facades\Notification; use Tests\TestCase; -final class ConsumableCheckoutTest extends TestCase +class ConsumableCheckoutTest extends TestCase { public function testCheckingOutConsumableRequiresCorrectPermission() { diff --git a/tests/Feature/Checkouts/Ui/LicenseCheckoutTest.php b/tests/Feature/Checkouts/Ui/LicenseCheckoutTest.php index 5498193352..9511c3ae33 100644 --- a/tests/Feature/Checkouts/Ui/LicenseCheckoutTest.php +++ b/tests/Feature/Checkouts/Ui/LicenseCheckoutTest.php @@ -8,7 +8,7 @@ use App\Models\LicenseSeat; use App\Models\User; use Tests\TestCase; -final class LicenseCheckoutTest extends TestCase +class LicenseCheckoutTest extends TestCase { public function testNotesAreStoredInActionLogOnCheckoutToAsset() { diff --git a/tests/Feature/Components/Api/ComponentIndexTest.php b/tests/Feature/Components/Api/ComponentIndexTest.php index a0091f3159..4260372c0b 100644 --- a/tests/Feature/Components/Api/ComponentIndexTest.php +++ b/tests/Feature/Components/Api/ComponentIndexTest.php @@ -7,7 +7,7 @@ use App\Models\Component; use App\Models\User; use Tests\TestCase; -final class ComponentIndexTest extends TestCase +class ComponentIndexTest extends TestCase { public function testComponentIndexAdheresToCompanyScoping() { diff --git a/tests/Feature/Components/Ui/ComponentIndexTest.php b/tests/Feature/Components/Ui/ComponentIndexTest.php index 49e062a8e7..41b733e046 100644 --- a/tests/Feature/Components/Ui/ComponentIndexTest.php +++ b/tests/Feature/Components/Ui/ComponentIndexTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature\Components\Ui; use App\Models\User; use Tests\TestCase; -final class ComponentIndexTest extends TestCase +class ComponentIndexTest extends TestCase { public function testPermissionRequiredToViewComponentsList() { diff --git a/tests/Feature/Console/MergeUsersTest.php b/tests/Feature/Console/MergeUsersTest.php index e46be18c70..4c43e6293d 100644 --- a/tests/Feature/Console/MergeUsersTest.php +++ b/tests/Feature/Console/MergeUsersTest.php @@ -11,7 +11,7 @@ use App\Models\Actionlog; use Tests\TestCase; -final class MergeUsersTest extends TestCase +class MergeUsersTest extends TestCase { public function testAssetsAreTransferredOnUserMerge() { diff --git a/tests/Feature/Console/OptimizeTest.php b/tests/Feature/Console/OptimizeTest.php index 2dd2ce6c4b..8dd6f270f9 100644 --- a/tests/Feature/Console/OptimizeTest.php +++ b/tests/Feature/Console/OptimizeTest.php @@ -4,7 +4,7 @@ namespace Tests\Feature\Console; use Tests\TestCase; -final class OptimizeTest extends TestCase +class OptimizeTest extends TestCase { public function testOptimizeSucceeds() { diff --git a/tests/Feature/Consumables/Api/ConsumableIndexTest.php b/tests/Feature/Consumables/Api/ConsumableIndexTest.php index 2ad8601657..f1d3ad7f0b 100644 --- a/tests/Feature/Consumables/Api/ConsumableIndexTest.php +++ b/tests/Feature/Consumables/Api/ConsumableIndexTest.php @@ -7,7 +7,7 @@ use App\Models\Consumable; use App\Models\User; use Tests\TestCase; -final class ConsumableIndexTest extends TestCase +class ConsumableIndexTest extends TestCase { public function testConsumableIndexAdheresToCompanyScoping() { diff --git a/tests/Feature/Consumables/Api/ConsumableUpdateTest.php b/tests/Feature/Consumables/Api/ConsumableUpdateTest.php index a21052f0a2..1c1e05d4d4 100644 --- a/tests/Feature/Consumables/Api/ConsumableUpdateTest.php +++ b/tests/Feature/Consumables/Api/ConsumableUpdateTest.php @@ -7,7 +7,7 @@ use App\Models\Category; use App\Models\User; use Tests\TestCase; -final class ConsumableUpdateTest extends TestCase +class ConsumableUpdateTest extends TestCase { public function testCanUpdateConsumableViaPatchWithoutCategoryType() diff --git a/tests/Feature/Consumables/Api/ConsumableViewTest.php b/tests/Feature/Consumables/Api/ConsumableViewTest.php index 1cc5c26e4a..c6410216e1 100644 --- a/tests/Feature/Consumables/Api/ConsumableViewTest.php +++ b/tests/Feature/Consumables/Api/ConsumableViewTest.php @@ -7,7 +7,7 @@ use App\Models\Consumable; use App\Models\User; use Tests\TestCase; -final class ConsumableViewTest extends TestCase +class ConsumableViewTest extends TestCase { public function testConsumableViewAdheresToCompanyScoping() { diff --git a/tests/Feature/Consumables/Ui/ConsumableIndexTest.php b/tests/Feature/Consumables/Ui/ConsumableIndexTest.php index ae2ad06119..3c438187ca 100644 --- a/tests/Feature/Consumables/Ui/ConsumableIndexTest.php +++ b/tests/Feature/Consumables/Ui/ConsumableIndexTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature\Consumables\Ui; use App\Models\User; use Tests\TestCase; -final class ConsumableIndexTest extends TestCase +class ConsumableIndexTest extends TestCase { public function testPermissionRequiredToViewConsumablesList() { diff --git a/tests/Feature/Consumables/Ui/ConsumableViewTest.php b/tests/Feature/Consumables/Ui/ConsumableViewTest.php index e80f4342e2..9633896c2d 100644 --- a/tests/Feature/Consumables/Ui/ConsumableViewTest.php +++ b/tests/Feature/Consumables/Ui/ConsumableViewTest.php @@ -6,7 +6,7 @@ use App\Models\Consumable; use App\Models\User; use Tests\TestCase; -final class ConsumableViewTest extends TestCase +class ConsumableViewTest extends TestCase { public function testPermissionRequiredToViewConsumable() { diff --git a/tests/Feature/DashboardTest.php b/tests/Feature/DashboardTest.php index a5d60e5eff..4690a13901 100644 --- a/tests/Feature/DashboardTest.php +++ b/tests/Feature/DashboardTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature; use App\Models\User; use Tests\TestCase; -final class DashboardTest extends TestCase +class DashboardTest extends TestCase { public function testUsersWithoutAdminAccessAreRedirected() { diff --git a/tests/Feature/Departments/Api/CreateDepartmentsTest.php b/tests/Feature/Departments/Api/CreateDepartmentsTest.php index 10e7823b21..a8725c5ff2 100644 --- a/tests/Feature/Departments/Api/CreateDepartmentsTest.php +++ b/tests/Feature/Departments/Api/CreateDepartmentsTest.php @@ -9,7 +9,7 @@ use App\Models\User; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -final class CreateDepartmentsTest extends TestCase +class CreateDepartmentsTest extends TestCase { diff --git a/tests/Feature/Departments/Api/DepartmentsIndexTest.php b/tests/Feature/Departments/Api/DepartmentsIndexTest.php index 6fcf6b008f..e3616e2491 100644 --- a/tests/Feature/Departments/Api/DepartmentsIndexTest.php +++ b/tests/Feature/Departments/Api/DepartmentsIndexTest.php @@ -8,7 +8,7 @@ use App\Models\User; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -final class DepartmentsIndexTest extends TestCase +class DepartmentsIndexTest extends TestCase { public function testViewingDepartmentIndexRequiresAuthentication() { diff --git a/tests/Feature/Departments/Api/UpdateDepartmentsTest.php b/tests/Feature/Departments/Api/UpdateDepartmentsTest.php index d5d8c4811c..2a6401e7f1 100644 --- a/tests/Feature/Departments/Api/UpdateDepartmentsTest.php +++ b/tests/Feature/Departments/Api/UpdateDepartmentsTest.php @@ -7,7 +7,7 @@ use App\Models\Category; use App\Models\User; use Tests\TestCase; -final class UpdateDepartmentsTest extends TestCase +class UpdateDepartmentsTest extends TestCase { public function testRequiresPermissionToEditDepartment() diff --git a/tests/Feature/Departments/Ui/CreateDepartmentsTest.php b/tests/Feature/Departments/Ui/CreateDepartmentsTest.php index 6d975d5a75..17045cbc0b 100644 --- a/tests/Feature/Departments/Ui/CreateDepartmentsTest.php +++ b/tests/Feature/Departments/Ui/CreateDepartmentsTest.php @@ -7,7 +7,7 @@ use App\Models\Company; use App\Models\User; use Tests\TestCase; -final class CreateDepartmentsTest extends TestCase +class CreateDepartmentsTest extends TestCase { public function testPermissionRequiredToCreateDepartment() { diff --git a/tests/Feature/Departments/Ui/IndexDepartmentsTest.php b/tests/Feature/Departments/Ui/IndexDepartmentsTest.php index 0cd802af46..461ec8fffb 100644 --- a/tests/Feature/Departments/Ui/IndexDepartmentsTest.php +++ b/tests/Feature/Departments/Ui/IndexDepartmentsTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature\Departments\Ui; use App\Models\User; use Tests\TestCase; -final class IndexDepartmentsTest extends TestCase +class IndexDepartmentsTest extends TestCase { public function testPermissionRequiredToViewDepartmentsList() { diff --git a/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php b/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php index 468176961c..e6e614d32c 100644 --- a/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php +++ b/tests/Feature/Departments/Ui/UpdateDepartmentsTest.php @@ -7,7 +7,7 @@ use App\Models\Category; use App\Models\User; use Tests\TestCase; -final class UpdateDepartmentsTest extends TestCase +class UpdateDepartmentsTest extends TestCase { public function testPermissionRequiredToStoreDepartment() { diff --git a/tests/Feature/Groups/Api/StoreGroupTest.php b/tests/Feature/Groups/Api/StoreGroupTest.php index f48210551a..ebcbff71c5 100644 --- a/tests/Feature/Groups/Api/StoreGroupTest.php +++ b/tests/Feature/Groups/Api/StoreGroupTest.php @@ -7,7 +7,7 @@ use App\Models\Group; use App\Models\User; use Tests\TestCase; -final class StoreGroupTest extends TestCase +class StoreGroupTest extends TestCase { public function testStoringGroupRequiresSuperAdminPermission() { diff --git a/tests/Feature/Groups/Ui/IndexGroupTest.php b/tests/Feature/Groups/Ui/IndexGroupTest.php index b9010bd303..a2d67f903c 100644 --- a/tests/Feature/Groups/Ui/IndexGroupTest.php +++ b/tests/Feature/Groups/Ui/IndexGroupTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature\Groups\Ui; use App\Models\User; use Tests\TestCase; -final class IndexGroupTest extends TestCase +class IndexGroupTest extends TestCase { public function testPermissionRequiredToViewGroupList() { diff --git a/tests/Feature/Licenses/Api/LicenseIndexTest.php b/tests/Feature/Licenses/Api/LicenseIndexTest.php index 1b5d933e50..1df7864278 100644 --- a/tests/Feature/Licenses/Api/LicenseIndexTest.php +++ b/tests/Feature/Licenses/Api/LicenseIndexTest.php @@ -7,7 +7,7 @@ use App\Models\License; use App\Models\User; use Tests\TestCase; -final class LicenseIndexTest extends TestCase +class LicenseIndexTest extends TestCase { public function testLicensesIndexAdheresToCompanyScoping() { diff --git a/tests/Feature/Licenses/Ui/CreateLicenseTest.php b/tests/Feature/Licenses/Ui/CreateLicenseTest.php index dcbe90f222..f24c3bd2ce 100644 --- a/tests/Feature/Licenses/Ui/CreateLicenseTest.php +++ b/tests/Feature/Licenses/Ui/CreateLicenseTest.php @@ -9,7 +9,7 @@ use App\Models\Depreciation; use App\Models\User; use Tests\TestCase; -final class CreateLicenseTest extends TestCase +class CreateLicenseTest extends TestCase { public function testPermissionRequiredToViewLicense() { diff --git a/tests/Feature/Licenses/Ui/LicenseIndexTest.php b/tests/Feature/Licenses/Ui/LicenseIndexTest.php index ac81ac66d5..3eb33e5ee4 100644 --- a/tests/Feature/Licenses/Ui/LicenseIndexTest.php +++ b/tests/Feature/Licenses/Ui/LicenseIndexTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature\Licenses\Ui; use App\Models\User; use Tests\TestCase; -final class LicenseIndexTest extends TestCase +class LicenseIndexTest extends TestCase { public function testPermissionRequiredToViewLicenseList() { diff --git a/tests/Feature/Licenses/Ui/LicenseViewTest.php b/tests/Feature/Licenses/Ui/LicenseViewTest.php index f4b41f2df8..3b1f7830d4 100644 --- a/tests/Feature/Licenses/Ui/LicenseViewTest.php +++ b/tests/Feature/Licenses/Ui/LicenseViewTest.php @@ -7,7 +7,7 @@ use App\Models\Depreciation; use App\Models\User; use Tests\TestCase; -final class LicenseViewTest extends TestCase +class LicenseViewTest extends TestCase { public function testPermissionRequiredToViewLicense() { diff --git a/tests/Feature/Livewire/CategoryEditFormTest.php b/tests/Feature/Livewire/CategoryEditFormTest.php index 6b5a32123e..a439f544ac 100644 --- a/tests/Feature/Livewire/CategoryEditFormTest.php +++ b/tests/Feature/Livewire/CategoryEditFormTest.php @@ -6,7 +6,7 @@ use App\Livewire\CategoryEditForm; use Livewire\Livewire; use Tests\TestCase; -final class CategoryEditFormTest extends TestCase +class CategoryEditFormTest extends TestCase { public function testTheComponentCanRender() { diff --git a/tests/Feature/Locations/Api/CreateLocationsTest.php b/tests/Feature/Locations/Api/CreateLocationsTest.php index b084c42073..171508b725 100644 --- a/tests/Feature/Locations/Api/CreateLocationsTest.php +++ b/tests/Feature/Locations/Api/CreateLocationsTest.php @@ -6,7 +6,7 @@ use App\Models\Location; use App\Models\User; use Tests\TestCase; -final class CreateLocationsTest extends TestCase +class CreateLocationsTest extends TestCase { public function testRequiresPermissionToCreateLocation() diff --git a/tests/Feature/Locations/Api/DeleteLocationsTest.php b/tests/Feature/Locations/Api/DeleteLocationsTest.php index 8f08919686..270582c901 100644 --- a/tests/Feature/Locations/Api/DeleteLocationsTest.php +++ b/tests/Feature/Locations/Api/DeleteLocationsTest.php @@ -7,7 +7,7 @@ use App\Models\Location; use App\Models\User; use Tests\TestCase; -final class DeleteLocationsTest extends TestCase +class DeleteLocationsTest extends TestCase { public function testErrorReturnedViaApiIfLocationDoesNotExist() diff --git a/tests/Feature/Locations/Api/IndexLocationsTest.php b/tests/Feature/Locations/Api/IndexLocationsTest.php index 3c6309a78a..7b3b104638 100644 --- a/tests/Feature/Locations/Api/IndexLocationsTest.php +++ b/tests/Feature/Locations/Api/IndexLocationsTest.php @@ -8,7 +8,7 @@ use App\Models\User; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -final class IndexLocationsTest extends TestCase +class IndexLocationsTest extends TestCase { public function testViewingLocationIndexRequiresAuthentication() { diff --git a/tests/Feature/Locations/Api/LocationsForSelectListTest.php b/tests/Feature/Locations/Api/LocationsForSelectListTest.php index 4e20ef3d86..f34b97892f 100644 --- a/tests/Feature/Locations/Api/LocationsForSelectListTest.php +++ b/tests/Feature/Locations/Api/LocationsForSelectListTest.php @@ -7,7 +7,7 @@ use App\Models\User; use Illuminate\Testing\Fluent\AssertableJson; use Tests\TestCase; -final class LocationsForSelectListTest extends TestCase +class LocationsForSelectListTest extends TestCase { public function testGettingLocationListRequiresProperPermission() { diff --git a/tests/Feature/Locations/Api/LocationsViewTest.php b/tests/Feature/Locations/Api/LocationsViewTest.php index 618bf9c593..1d57e58263 100644 --- a/tests/Feature/Locations/Api/LocationsViewTest.php +++ b/tests/Feature/Locations/Api/LocationsViewTest.php @@ -7,7 +7,7 @@ use App\Models\Asset; use App\Models\User; use Tests\TestCase; -final class LocationsViewTest extends TestCase +class LocationsViewTest extends TestCase { public function testViewingLocationRequiresPermission() { diff --git a/tests/Feature/Locations/Api/UpdateLocationsTest.php b/tests/Feature/Locations/Api/UpdateLocationsTest.php index ca38568714..a3dd8c228c 100644 --- a/tests/Feature/Locations/Api/UpdateLocationsTest.php +++ b/tests/Feature/Locations/Api/UpdateLocationsTest.php @@ -6,7 +6,7 @@ use App\Models\Location; use App\Models\User; use Tests\TestCase; -final class UpdateLocationsTest extends TestCase +class UpdateLocationsTest extends TestCase { public function testRequiresPermissionToEditLocation() diff --git a/tests/Feature/Locations/Ui/CreateLocationsTest.php b/tests/Feature/Locations/Ui/CreateLocationsTest.php index ef981d7d1c..5e229f1043 100644 --- a/tests/Feature/Locations/Ui/CreateLocationsTest.php +++ b/tests/Feature/Locations/Ui/CreateLocationsTest.php @@ -7,7 +7,7 @@ use App\Models\Company; use App\Models\User; use Tests\TestCase; -final class CreateLocationsTest extends TestCase +class CreateLocationsTest extends TestCase { public function testPermissionRequiredToCreateLocation() { diff --git a/tests/Feature/Locations/Ui/IndexLocationsTest.php b/tests/Feature/Locations/Ui/IndexLocationsTest.php index 23574ae0ca..43f117cb64 100644 --- a/tests/Feature/Locations/Ui/IndexLocationsTest.php +++ b/tests/Feature/Locations/Ui/IndexLocationsTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature\Locations\Ui; use App\Models\User; use Tests\TestCase; -final class IndexLocationsTest extends TestCase +class IndexLocationsTest extends TestCase { public function testPermissionRequiredToViewLocationsList() { diff --git a/tests/Feature/Locations/Ui/UpdateLocationsTest.php b/tests/Feature/Locations/Ui/UpdateLocationsTest.php index 0db66a800c..5359cd1b71 100644 --- a/tests/Feature/Locations/Ui/UpdateLocationsTest.php +++ b/tests/Feature/Locations/Ui/UpdateLocationsTest.php @@ -6,7 +6,7 @@ use App\Models\Location; use App\Models\User; use Tests\TestCase; -final class UpdateLocationsTest extends TestCase +class UpdateLocationsTest extends TestCase { public function testPermissionRequiredToStoreLocation() { diff --git a/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php b/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php index b00472b4ed..449f65c7ab 100644 --- a/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php +++ b/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php @@ -11,7 +11,7 @@ use Illuminate\Support\Facades\Notification; use Tests\TestCase; #[Group('notifications')] -final class EmailNotificationsUponCheckinTest extends TestCase +class EmailNotificationsUponCheckinTest extends TestCase { protected function setUp(): void { diff --git a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php index 32aa34770c..adaede07ec 100644 --- a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php +++ b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php @@ -19,7 +19,7 @@ use Illuminate\Support\Facades\Notification; use Tests\TestCase; #[Group('notifications')] -final class SlackNotificationsUponCheckinTest extends TestCase +class SlackNotificationsUponCheckinTest extends TestCase { protected function setUp(): void { diff --git a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php index d6ad65041a..4f34da2857 100644 --- a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php +++ b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php @@ -21,7 +21,7 @@ use Illuminate\Support\Facades\Notification; use Tests\TestCase; #[Group('notifications')] -final class SlackNotificationsUponCheckoutTest extends TestCase +class SlackNotificationsUponCheckoutTest extends TestCase { protected function setUp(): void { diff --git a/tests/Feature/Reporting/CustomReportTest.php b/tests/Feature/Reporting/CustomReportTest.php index 89dcafa2c8..4d11cb23c8 100644 --- a/tests/Feature/Reporting/CustomReportTest.php +++ b/tests/Feature/Reporting/CustomReportTest.php @@ -10,7 +10,7 @@ use League\Csv\Reader; use PHPUnit\Framework\Assert; use Tests\TestCase; -final class CustomReportTest extends TestCase +class CustomReportTest extends TestCase { protected function setUp(): void { diff --git a/tests/Feature/Reporting/UnacceptedAssetReportTest.php b/tests/Feature/Reporting/UnacceptedAssetReportTest.php index 90ef96bc85..b3ec0b2e0b 100644 --- a/tests/Feature/Reporting/UnacceptedAssetReportTest.php +++ b/tests/Feature/Reporting/UnacceptedAssetReportTest.php @@ -10,7 +10,7 @@ use League\Csv\Reader; use PHPUnit\Framework\Assert; use Tests\TestCase; -final class UnacceptedAssetReportTest extends TestCase +class UnacceptedAssetReportTest extends TestCase { protected function setUp(): void { diff --git a/tests/Feature/Settings/BrandingSettingsTest.php b/tests/Feature/Settings/BrandingSettingsTest.php index 1543bdce9a..03e2b013f6 100644 --- a/tests/Feature/Settings/BrandingSettingsTest.php +++ b/tests/Feature/Settings/BrandingSettingsTest.php @@ -10,7 +10,7 @@ use App\Models\User; use App\Models\Setting; -final class BrandingSettingsTest extends TestCase +class BrandingSettingsTest extends TestCase { public function testSiteNameIsRequired() { diff --git a/tests/Feature/Settings/ShowSetUpPageTest.php b/tests/Feature/Settings/ShowSetUpPageTest.php index 83b0a1e3f0..196902ac5f 100644 --- a/tests/Feature/Settings/ShowSetUpPageTest.php +++ b/tests/Feature/Settings/ShowSetUpPageTest.php @@ -19,7 +19,7 @@ use Illuminate\Testing\TestResponse; use PDOException; use Tests\TestCase; -final class ShowSetUpPageTest extends TestCase +class ShowSetUpPageTest extends TestCase { /** * We do not want to make actual http request on every test to check .env file diff --git a/tests/Feature/Users/Api/DeleteUserTest.php b/tests/Feature/Users/Api/DeleteUserTest.php index 2c134ccc64..49625daac3 100644 --- a/tests/Feature/Users/Api/DeleteUserTest.php +++ b/tests/Feature/Users/Api/DeleteUserTest.php @@ -8,7 +8,7 @@ use App\Models\Location; use App\Models\User; use Tests\TestCase; -final class DeleteUserTest extends TestCase +class DeleteUserTest extends TestCase { diff --git a/tests/Feature/Users/Api/RestoreUserTest.php b/tests/Feature/Users/Api/RestoreUserTest.php index 709c2ac0fc..0ffac8f07e 100644 --- a/tests/Feature/Users/Api/RestoreUserTest.php +++ b/tests/Feature/Users/Api/RestoreUserTest.php @@ -8,7 +8,7 @@ use App\Models\Location; use App\Models\User; use Tests\TestCase; -final class RestoreUserTest extends TestCase +class RestoreUserTest extends TestCase { diff --git a/tests/Feature/Users/Api/UpdateUserTest.php b/tests/Feature/Users/Api/UpdateUserTest.php index 918d7f0886..1c66bbdda9 100644 --- a/tests/Feature/Users/Api/UpdateUserTest.php +++ b/tests/Feature/Users/Api/UpdateUserTest.php @@ -10,7 +10,7 @@ use App\Models\User; use Illuminate\Support\Facades\Hash; use Tests\TestCase; -final class UpdateUserTest extends TestCase +class UpdateUserTest extends TestCase { public function testCanUpdateUserViaPatch() { diff --git a/tests/Feature/Users/Api/UserSearchTest.php b/tests/Feature/Users/Api/UserSearchTest.php index 8478171c75..dc0ffdc803 100644 --- a/tests/Feature/Users/Api/UserSearchTest.php +++ b/tests/Feature/Users/Api/UserSearchTest.php @@ -7,7 +7,7 @@ use App\Models\User; use Laravel\Passport\Passport; use Tests\TestCase; -final class UserSearchTest extends TestCase +class UserSearchTest extends TestCase { public function testCanSearchByUserFirstAndLastName() { diff --git a/tests/Feature/Users/Api/UsersForSelectListTest.php b/tests/Feature/Users/Api/UsersForSelectListTest.php index 237ee57c83..1367f408d4 100644 --- a/tests/Feature/Users/Api/UsersForSelectListTest.php +++ b/tests/Feature/Users/Api/UsersForSelectListTest.php @@ -8,7 +8,7 @@ use Illuminate\Testing\Fluent\AssertableJson; use Laravel\Passport\Passport; use Tests\TestCase; -final class UsersForSelectListTest extends TestCase +class UsersForSelectListTest extends TestCase { public function testUsersAreReturned() { diff --git a/tests/Feature/Users/Api/ViewUserTest.php b/tests/Feature/Users/Api/ViewUserTest.php index 325c8ec1f4..07346dbbb8 100644 --- a/tests/Feature/Users/Api/ViewUserTest.php +++ b/tests/Feature/Users/Api/ViewUserTest.php @@ -8,7 +8,7 @@ use Illuminate\Testing\Fluent\AssertableJson; use Laravel\Passport\Passport; use Tests\TestCase; -final class ViewUserTest extends TestCase +class ViewUserTest extends TestCase { public function testCanReturnUser() diff --git a/tests/Feature/Users/Ui/DeleteUserTest.php b/tests/Feature/Users/Ui/DeleteUserTest.php index 6d71041d61..da4c5a37ee 100644 --- a/tests/Feature/Users/Ui/DeleteUserTest.php +++ b/tests/Feature/Users/Ui/DeleteUserTest.php @@ -11,7 +11,7 @@ use App\Models\Company; use App\Models\Asset; -final class DeleteUserTest extends TestCase +class DeleteUserTest extends TestCase { public function testUserCanDeleteAnotherUser() diff --git a/tests/Feature/Users/Ui/MergeUsersTest.php b/tests/Feature/Users/Ui/MergeUsersTest.php index 2685a72e88..a9ae11171b 100644 --- a/tests/Feature/Users/Ui/MergeUsersTest.php +++ b/tests/Feature/Users/Ui/MergeUsersTest.php @@ -11,7 +11,7 @@ use App\Models\Actionlog; use Tests\TestCase; -final class MergeUsersTest extends TestCase +class MergeUsersTest extends TestCase { public function testAssetsAreTransferredOnUserMerge() { diff --git a/tests/Feature/Users/Ui/UpdateUserTest.php b/tests/Feature/Users/Ui/UpdateUserTest.php index 89c005b590..bef1d59a06 100644 --- a/tests/Feature/Users/Ui/UpdateUserTest.php +++ b/tests/Feature/Users/Ui/UpdateUserTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature\Users\Ui; use App\Models\User; use Tests\TestCase; -final class UpdateUserTest extends TestCase +class UpdateUserTest extends TestCase { public function testUsersCanBeActivatedWithNumber() { diff --git a/tests/Feature/Users/Ui/ViewUserTest.php b/tests/Feature/Users/Ui/ViewUserTest.php index d28bbb6d31..c412e9e789 100644 --- a/tests/Feature/Users/Ui/ViewUserTest.php +++ b/tests/Feature/Users/Ui/ViewUserTest.php @@ -8,7 +8,7 @@ use App\Notifications\CurrentInventory; use Illuminate\Support\Facades\Notification; use Tests\TestCase; -final class ViewUserTest extends TestCase +class ViewUserTest extends TestCase { public function testPermissionsForUserDetailPage() { diff --git a/tests/Unit/AccessoryTest.php b/tests/Unit/AccessoryTest.php index 2ce1b96242..ec931fad6e 100644 --- a/tests/Unit/AccessoryTest.php +++ b/tests/Unit/AccessoryTest.php @@ -8,7 +8,7 @@ use App\Models\Category; use App\Models\Company; use Tests\TestCase; -final class AccessoryTest extends TestCase +class AccessoryTest extends TestCase { public function testAnAccessoryBelongsToACompany() { diff --git a/tests/Unit/AssetMaintenanceTest.php b/tests/Unit/AssetMaintenanceTest.php index 50ccaac357..46a0efdd7c 100644 --- a/tests/Unit/AssetMaintenanceTest.php +++ b/tests/Unit/AssetMaintenanceTest.php @@ -4,7 +4,7 @@ namespace Tests\Unit; use App\Models\AssetMaintenance; use Tests\TestCase; -final class AssetMaintenanceTest extends TestCase +class AssetMaintenanceTest extends TestCase { public function testZerosOutWarrantyIfBlank() { diff --git a/tests/Unit/AssetModelTest.php b/tests/Unit/AssetModelTest.php index 57ac292f73..4cc62e20a0 100644 --- a/tests/Unit/AssetModelTest.php +++ b/tests/Unit/AssetModelTest.php @@ -6,7 +6,7 @@ use App\Models\Category; use App\Models\AssetModel; use Tests\TestCase; -final class AssetModelTest extends TestCase +class AssetModelTest extends TestCase { public function testAnAssetModelContainsAssets() { diff --git a/tests/Unit/AssetTest.php b/tests/Unit/AssetTest.php index 7ba468ee3f..ef0da1a1b8 100644 --- a/tests/Unit/AssetTest.php +++ b/tests/Unit/AssetTest.php @@ -8,7 +8,7 @@ use Carbon\Carbon; use Tests\TestCase; use App\Models\Setting; -final class AssetTest extends TestCase +class AssetTest extends TestCase { public function testAutoIncrement() { diff --git a/tests/Unit/CategoryTest.php b/tests/Unit/CategoryTest.php index 75e79b0bd4..391e291552 100644 --- a/tests/Unit/CategoryTest.php +++ b/tests/Unit/CategoryTest.php @@ -6,7 +6,7 @@ use App\Models\AssetModel; use App\Models\Asset; use Tests\TestCase; -final class CategoryTest extends TestCase +class CategoryTest extends TestCase { public function testFailsEmptyValidation() { diff --git a/tests/Unit/CompanyScopingTest.php b/tests/Unit/CompanyScopingTest.php index 664d6301fd..ff55e83056 100644 --- a/tests/Unit/CompanyScopingTest.php +++ b/tests/Unit/CompanyScopingTest.php @@ -15,7 +15,7 @@ use App\Models\User; use Illuminate\Database\Eloquent\Model; use Tests\TestCase; -final class CompanyScopingTest extends TestCase +class CompanyScopingTest extends TestCase { public static function models(): array { diff --git a/tests/Unit/ComponentTest.php b/tests/Unit/ComponentTest.php index d0f9605740..df8f64771f 100644 --- a/tests/Unit/ComponentTest.php +++ b/tests/Unit/ComponentTest.php @@ -7,7 +7,7 @@ use App\Models\Component; use App\Models\Location; use Tests\TestCase; -final class ComponentTest extends TestCase +class ComponentTest extends TestCase { public function testAComponentBelongsToACompany() { diff --git a/tests/Unit/CustomFieldTest.php b/tests/Unit/CustomFieldTest.php index da4272323b..d5704d8aa3 100644 --- a/tests/Unit/CustomFieldTest.php +++ b/tests/Unit/CustomFieldTest.php @@ -8,7 +8,7 @@ use Tests\TestCase; * Test strings for db column names gathered from * http://www.omniglot.com/language/phrases/hovercraft.htm */ -final class CustomFieldTest extends TestCase +class CustomFieldTest extends TestCase { public function testFormat() { diff --git a/tests/Unit/DepreciationTest.php b/tests/Unit/DepreciationTest.php index c622eaa92b..4dd8422276 100644 --- a/tests/Unit/DepreciationTest.php +++ b/tests/Unit/DepreciationTest.php @@ -7,7 +7,7 @@ use App\Models\License; use App\Models\AssetModel; use Tests\TestCase; -final class DepreciationTest extends TestCase +class DepreciationTest extends TestCase { public function testADepreciationHasModels() { diff --git a/tests/Unit/Helpers/HelperTest.php b/tests/Unit/Helpers/HelperTest.php index dc06887e73..2fb1c58e26 100644 --- a/tests/Unit/Helpers/HelperTest.php +++ b/tests/Unit/Helpers/HelperTest.php @@ -8,7 +8,7 @@ use Illuminate\Support\Facades\Redirect; use Illuminate\Support\Facades\Session; use Tests\TestCase; -final class HelperTest extends TestCase +class HelperTest extends TestCase { public function testDefaultChartColorsMethodHandlesHighValues() { diff --git a/tests/Unit/LdapTest.php b/tests/Unit/LdapTest.php index 3e7b9d75fa..65bdbe627c 100644 --- a/tests/Unit/LdapTest.php +++ b/tests/Unit/LdapTest.php @@ -7,7 +7,7 @@ use App\Models\Ldap; use Tests\TestCase; #[Group('ldap')] -final class LdapTest extends TestCase +class LdapTest extends TestCase { use \phpmock\phpunit\PHPMock; diff --git a/tests/Unit/Listeners/LogListenerTest.php b/tests/Unit/Listeners/LogListenerTest.php index f5ab6d1393..011a5c51a4 100644 --- a/tests/Unit/Listeners/LogListenerTest.php +++ b/tests/Unit/Listeners/LogListenerTest.php @@ -8,7 +8,7 @@ use App\Models\Asset; use App\Models\User; use Tests\TestCase; -final class LogListenerTest extends TestCase +class LogListenerTest extends TestCase { public function testLogsEntryOnCheckoutableCheckedOut() { diff --git a/tests/Unit/LocationTest.php b/tests/Unit/LocationTest.php index 0c5f535b04..3fded9e568 100644 --- a/tests/Unit/LocationTest.php +++ b/tests/Unit/LocationTest.php @@ -4,7 +4,7 @@ namespace Tests\Unit; use App\Models\Location; use Tests\TestCase; -final class LocationTest extends TestCase +class LocationTest extends TestCase { public function testPassesIfNotSelfParent() { diff --git a/tests/Unit/Models/Company/CompanyTest.php b/tests/Unit/Models/Company/CompanyTest.php index 66836afd73..6fd17e554b 100644 --- a/tests/Unit/Models/Company/CompanyTest.php +++ b/tests/Unit/Models/Company/CompanyTest.php @@ -5,7 +5,7 @@ use App\Models\Company; use App\Models\User; use Tests\TestCase; -final class CompanyTest extends TestCase +class CompanyTest extends TestCase { public function testACompanyCanHaveUsers() { diff --git a/tests/Unit/Models/Company/GetIdForCurrentUserTest.php b/tests/Unit/Models/Company/GetIdForCurrentUserTest.php index 7ef5b9595d..6d77c88731 100644 --- a/tests/Unit/Models/Company/GetIdForCurrentUserTest.php +++ b/tests/Unit/Models/Company/GetIdForCurrentUserTest.php @@ -6,7 +6,7 @@ use App\Models\Company; use App\Models\User; use Tests\TestCase; -final class GetIdForCurrentUserTest extends TestCase +class GetIdForCurrentUserTest extends TestCase { public function testReturnsProvidedValueWhenFullCompanySupportDisabled() { diff --git a/tests/Unit/Models/Labels/FieldOptionTest.php b/tests/Unit/Models/Labels/FieldOptionTest.php index 45756daec2..6616ab2304 100644 --- a/tests/Unit/Models/Labels/FieldOptionTest.php +++ b/tests/Unit/Models/Labels/FieldOptionTest.php @@ -7,7 +7,7 @@ use App\Models\Labels\FieldOption; use App\Models\User; use Tests\TestCase; -final class FieldOptionTest extends TestCase +class FieldOptionTest extends TestCase { public function testItDisplaysAssignedToProperly() { diff --git a/tests/Unit/NotificationTest.php b/tests/Unit/NotificationTest.php index dbeaa44ca2..8005759a1e 100644 --- a/tests/Unit/NotificationTest.php +++ b/tests/Unit/NotificationTest.php @@ -10,7 +10,7 @@ use App\Notifications\CheckoutAssetNotification; use Illuminate\Support\Facades\Notification; use Tests\TestCase; -final class NotificationTest extends TestCase +class NotificationTest extends TestCase { public function testAUserIsEmailedIfTheyCheckoutAnAssetWithEULA() { diff --git a/tests/Unit/SnipeModelTest.php b/tests/Unit/SnipeModelTest.php index 3084aba1bd..2bc81da61b 100644 --- a/tests/Unit/SnipeModelTest.php +++ b/tests/Unit/SnipeModelTest.php @@ -4,7 +4,7 @@ namespace Tests\Unit; use App\Models\SnipeModel; use Tests\TestCase; -final class SnipeModelTest extends TestCase +class SnipeModelTest extends TestCase { public function testSetsPurchaseDatesAppropriately() { diff --git a/tests/Unit/SnipeTranslatorTest.php b/tests/Unit/SnipeTranslatorTest.php index c8f10b7621..d374bf9134 100644 --- a/tests/Unit/SnipeTranslatorTest.php +++ b/tests/Unit/SnipeTranslatorTest.php @@ -4,7 +4,7 @@ namespace Tests\Unit; use Tests\TestCase; -final class SnipeTranslatorTest extends TestCase +class SnipeTranslatorTest extends TestCase { // the 'meatiest' of these tests will explicitly choose non-English as the language, because otherwise // the fallback-logic (which is to fall-back to 'en-US') will be conflated in with the translation logic diff --git a/tests/Unit/StatuslabelTest.php b/tests/Unit/StatuslabelTest.php index 71e74ababe..fe5f3cacc0 100644 --- a/tests/Unit/StatuslabelTest.php +++ b/tests/Unit/StatuslabelTest.php @@ -4,7 +4,7 @@ namespace Tests\Unit; use App\Models\Statuslabel; use Tests\TestCase; -final class StatuslabelTest extends TestCase +class StatuslabelTest extends TestCase { public function testRTDStatuslabelAdd() { diff --git a/tests/Unit/UserTest.php b/tests/Unit/UserTest.php index 1681fac942..e089fc4023 100644 --- a/tests/Unit/UserTest.php +++ b/tests/Unit/UserTest.php @@ -4,7 +4,7 @@ namespace Tests\Unit; use App\Models\User; use Tests\TestCase; -final class UserTest extends TestCase +class UserTest extends TestCase { public function testFirstNameSplit() { From 047b77e038edf381d6a9aee1ffdfd0be50173377 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Tue, 6 Aug 2024 13:34:51 -0700 Subject: [PATCH 09/12] Composer update for phpunit, collision, and paratest composer update phpunit/phpunit nunomaduro/collision brianium/paratest --with-all-dependencies --- composer.lock | 1234 ++++++++++++++++++++++++------------------------- 1 file changed, 599 insertions(+), 635 deletions(-) diff --git a/composer.lock b/composer.lock index ae6675b718..8e0e934740 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "51e716db4ccd70bf942062789f7303ad", + "content-hash": "35c741a2d3300848d758b187554b5b17", "packages": [ { "name": "alek13/slack", @@ -5184,38 +5184,43 @@ }, { "name": "nunomaduro/collision", - "version": "v6.4.0", + "version": "v7.10.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "f05978827b9343cba381ca05b8c7deee346b6015" + "reference": "49ec67fa7b002712da8526678abd651c09f375b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/f05978827b9343cba381ca05b8c7deee346b6015", - "reference": "f05978827b9343cba381ca05b8c7deee346b6015", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/49ec67fa7b002712da8526678abd651c09f375b2", + "reference": "49ec67fa7b002712da8526678abd651c09f375b2", "shasum": "" }, "require": { - "filp/whoops": "^2.14.5", - "php": "^8.0.0", - "symfony/console": "^6.0.2" + "filp/whoops": "^2.15.3", + "nunomaduro/termwind": "^1.15.1", + "php": "^8.1.0", + "symfony/console": "^6.3.4" + }, + "conflict": { + "laravel/framework": ">=11.0.0" }, "require-dev": { - "brianium/paratest": "^6.4.1", - "laravel/framework": "^9.26.1", - "laravel/pint": "^1.1.1", - "nunomaduro/larastan": "^1.0.3", - "nunomaduro/mock-final-classes": "^1.1.0", - "orchestra/testbench": "^7.7", - "phpunit/phpunit": "^9.5.23", - "spatie/ignition": "^1.4.1" + "brianium/paratest": "^7.3.0", + "laravel/framework": "^10.28.0", + "laravel/pint": "^1.13.3", + "laravel/sail": "^1.25.0", + "laravel/sanctum": "^3.3.1", + "laravel/tinker": "^2.8.2", + "nunomaduro/larastan": "^2.6.4", + "orchestra/testbench-core": "^8.13.0", + "pestphp/pest": "^2.23.2", + "phpunit/phpunit": "^10.4.1", + "sebastian/environment": "^6.0.1", + "spatie/laravel-ignition": "^2.3.1" }, "type": "library", "extra": { - "branch-alias": { - "dev-develop": "6.x-dev" - }, "laravel": { "providers": [ "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" @@ -5223,6 +5228,9 @@ } }, "autoload": { + "files": [ + "./src/Adapters/Phpunit/Autoload.php" + ], "psr-4": { "NunoMaduro\\Collision\\": "src/" } @@ -5268,7 +5276,7 @@ "type": "patreon" } ], - "time": "2023-01-03T12:54:54+00:00" + "time": "2023-10-11T15:45:01+00:00" }, { "name": "nunomaduro/termwind", @@ -7524,30 +7532,32 @@ }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "2db5010a484d53ebf536087a70b4a5423c102372" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", + "reference": "2db5010a484d53ebf536087a70b4a5423c102372", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -7586,7 +7596,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1" }, "funding": [ { @@ -7594,33 +7605,33 @@ "type": "github" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2023-08-14T13:18:12+00:00" }, { "name": "sebastian/diff", - "version": "4.0.6", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" + "phpunit/phpunit": "^10.0", + "symfony/process": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -7652,7 +7663,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" }, "funding": [ { @@ -7660,34 +7672,34 @@ "type": "github" } ], - "time": "2024-03-02T06:30:58+00:00" + "time": "2024-03-02T07:15:17+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.6", + "version": "5.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" + "reference": "955288482d97c19a372d3f31006ab3f37da47adf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf", + "reference": "955288482d97c19a372d3f31006ab3f37da47adf", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -7729,7 +7741,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2" }, "funding": [ { @@ -7737,32 +7750,32 @@ "type": "github" } ], - "time": "2024-03-02T06:33:00+00:00" + "time": "2024-03-02T07:17:12+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.5", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -7792,7 +7805,7 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" }, "funding": [ { @@ -7800,7 +7813,7 @@ "type": "github" } ], - "time": "2023-02-03T06:07:39+00:00" + "time": "2023-02-03T07:05:40+00:00" }, { "name": "spatie/backtrace", @@ -8541,16 +8554,16 @@ }, { "name": "symfony/console", - "version": "v6.4.8", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "be5854cee0e8c7b110f00d695d11debdfa1a2a91" + "reference": "504974cbe43d05f83b201d6498c206f16fc0cdbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/be5854cee0e8c7b110f00d695d11debdfa1a2a91", - "reference": "be5854cee0e8c7b110f00d695d11debdfa1a2a91", + "url": "https://api.github.com/repos/symfony/console/zipball/504974cbe43d05f83b201d6498c206f16fc0cdbc", + "reference": "504974cbe43d05f83b201d6498c206f16fc0cdbc", "shasum": "" }, "require": { @@ -8615,7 +8628,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.8" + "source": "https://github.com/symfony/console/tree/v6.4.10" }, "funding": [ { @@ -8631,7 +8644,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-07-26T12:30:32+00:00" }, { "name": "symfony/css-selector", @@ -10445,20 +10458,20 @@ }, { "name": "symfony/string", - "version": "v6.4.8", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "a147c0f826c4a1f3afb763ab8e009e37c877a44d" + "reference": "ea272a882be7f20cad58d5d78c215001617b7f07" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/a147c0f826c4a1f3afb763ab8e009e37c877a44d", - "reference": "a147c0f826c4a1f3afb763ab8e009e37c877a44d", + "url": "https://api.github.com/repos/symfony/string/zipball/ea272a882be7f20cad58d5d78c215001617b7f07", + "reference": "ea272a882be7f20cad58d5d78c215001617b7f07", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -10468,11 +10481,12 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0|^7.0", - "symfony/http-client": "^5.4|^6.0|^7.0", - "symfony/intl": "^6.2|^7.0", + "symfony/emoji": "^7.1", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^5.4|^6.0|^7.0" + "symfony/var-exporter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -10511,7 +10525,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.8" + "source": "https://github.com/symfony/string/tree/v7.1.3" }, "funding": [ { @@ -10527,7 +10541,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-07-22T10:25:37+00:00" }, { "name": "symfony/translation", @@ -11846,16 +11860,16 @@ }, { "name": "brianium/paratest", - "version": "v6.11.1", + "version": "v7.4.5", "source": { "type": "git", "url": "https://github.com/paratestphp/paratest.git", - "reference": "78e297a969049ca7cc370e80ff5e102921ef39a3" + "reference": "d4de825332842a7dee1ff350f0fd6caafa930d79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paratestphp/paratest/zipball/78e297a969049ca7cc370e80ff5e102921ef39a3", - "reference": "78e297a969049ca7cc370e80ff5e102921ef39a3", + "url": "https://api.github.com/repos/paratestphp/paratest/zipball/d4de825332842a7dee1ff350f0fd6caafa930d79", + "reference": "d4de825332842a7dee1ff350f0fd6caafa930d79", "shasum": "" }, "require": { @@ -11863,25 +11877,27 @@ "ext-pcre": "*", "ext-reflection": "*", "ext-simplexml": "*", - "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1 || ^1.0.0", - "jean85/pretty-package-versions": "^2.0.5", - "php": "^7.3 || ^8.0", - "phpunit/php-code-coverage": "^9.2.25", - "phpunit/php-file-iterator": "^3.0.6", - "phpunit/php-timer": "^5.0.3", - "phpunit/phpunit": "^9.6.4", - "sebastian/environment": "^5.1.5", - "symfony/console": "^5.4.28 || ^6.3.4 || ^7.0.0", - "symfony/process": "^5.4.28 || ^6.3.4 || ^7.0.0" + "fidry/cpu-core-counter": "^1.1.0", + "jean85/pretty-package-versions": "^2.0.6", + "php": "~8.2.0 || ~8.3.0", + "phpunit/php-code-coverage": "^10.1.14 || ^11.0.3", + "phpunit/php-file-iterator": "^4.1.0 || ^5.0.0", + "phpunit/php-timer": "^6.0.0 || ^7.0.0", + "phpunit/phpunit": "^10.5.20 || ^11.1.3", + "sebastian/environment": "^6.1.0 || ^7.1.0", + "symfony/console": "^6.4.7 || ^7.1.0", + "symfony/process": "^6.4.7 || ^7.1.0" }, "require-dev": { "doctrine/coding-standard": "^12.0.0", "ext-pcov": "*", "ext-posix": "*", - "infection/infection": "^0.27.6", - "squizlabs/php_codesniffer": "^3.7.2", - "symfony/filesystem": "^5.4.25 || ^6.3.1 || ^7.0.0", - "vimeo/psalm": "^5.7.7" + "phpstan/phpstan": "^1.11.2", + "phpstan/phpstan-deprecation-rules": "^1.2.0", + "phpstan/phpstan-phpunit": "^1.4.0", + "phpstan/phpstan-strict-rules": "^1.6.0", + "squizlabs/php_codesniffer": "^3.10.1", + "symfony/filesystem": "^6.4.3 || ^7.1.0" }, "bin": [ "bin/paratest", @@ -11922,7 +11938,7 @@ ], "support": { "issues": "https://github.com/paratestphp/paratest/issues", - "source": "https://github.com/paratestphp/paratest/tree/v6.11.1" + "source": "https://github.com/paratestphp/paratest/tree/v7.4.5" }, "funding": [ { @@ -11934,7 +11950,7 @@ "type": "paypal" } ], - "time": "2024-03-13T06:54:29+00:00" + "time": "2024-05-31T13:59:20+00:00" }, { "name": "clue/ndjson-react", @@ -13971,16 +13987,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.31", + "version": "10.1.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" + "reference": "5da8b1728acd1e6ffdf2ff32ffbdfd04307f26ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/5da8b1728acd1e6ffdf2ff32ffbdfd04307f26ae", + "reference": "5da8b1728acd1e6ffdf2ff32ffbdfd04307f26ae", "shasum": "" }, "require": { @@ -13988,18 +14004,18 @@ "ext-libxml": "*", "ext-xmlwriter": "*", "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-text-template": "^3.0", + "sebastian/code-unit-reverse-lookup": "^3.0", + "sebastian/complexity": "^3.0", + "sebastian/environment": "^6.0", + "sebastian/lines-of-code": "^2.0", + "sebastian/version": "^4.0", "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.1" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -14008,7 +14024,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "10.1-dev" } }, "autoload": { @@ -14037,7 +14053,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.15" }, "funding": [ { @@ -14045,32 +14061,32 @@ "type": "github" } ], - "time": "2024-03-02T06:37:42+00:00" + "time": "2024-06-29T08:25:15+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -14097,7 +14113,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" }, "funding": [ { @@ -14105,28 +14122,28 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2023-08-31T06:24:48+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-pcntl": "*" @@ -14134,7 +14151,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -14160,7 +14177,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" }, "funding": [ { @@ -14168,32 +14185,32 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2023-02-03T06:56:09+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -14219,7 +14236,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" }, "funding": [ { @@ -14227,32 +14245,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2023-08-31T14:07:24+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -14278,7 +14296,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" }, "funding": [ { @@ -14286,54 +14304,52 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2023-02-03T06:57:52+00:00" }, { "name": "phpunit/phpunit", - "version": "9.6.19", + "version": "10.5.29", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8" + "reference": "8e9e80872b4e8064401788ee8a32d40b4455318f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8", - "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8e9e80872b4e8064401788ee8a32d40b4455318f", + "reference": "8e9e80872b4e8064401788ee8a32d40b4455318f", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.28", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", - "sebastian/version": "^3.0.2" + "myclabs/deep-copy": "^1.12.0", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.1.15", + "phpunit/php-file-iterator": "^4.1.0", + "phpunit/php-invoker": "^4.0.0", + "phpunit/php-text-template": "^3.0.1", + "phpunit/php-timer": "^6.0.0", + "sebastian/cli-parser": "^2.0.1", + "sebastian/code-unit": "^2.0.0", + "sebastian/comparator": "^5.0.1", + "sebastian/diff": "^5.1.1", + "sebastian/environment": "^6.1.0", + "sebastian/exporter": "^5.1.2", + "sebastian/global-state": "^6.0.2", + "sebastian/object-enumerator": "^5.0.0", + "sebastian/recursion-context": "^5.0.0", + "sebastian/type": "^4.0.0", + "sebastian/version": "^4.0.1" }, "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -14341,7 +14357,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.6-dev" + "dev-main": "10.5-dev" } }, "autoload": { @@ -14373,7 +14389,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.19" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.29" }, "funding": [ { @@ -14389,7 +14405,7 @@ "type": "tidelift" } ], - "time": "2024-04-05T04:35:58+00:00" + "time": "2024-07-30T11:08:00+00:00" }, { "name": "react/cache", @@ -14923,28 +14939,28 @@ }, { "name": "sebastian/cli-parser", - "version": "1.0.2", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -14967,7 +14983,8 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1" }, "funding": [ { @@ -14975,32 +14992,32 @@ "type": "github" } ], - "time": "2024-03-02T06:27:43+00:00" + "time": "2024-03-02T07:12:49+00:00" }, { "name": "sebastian/code-unit", - "version": "1.0.8", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -15023,7 +15040,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" }, "funding": [ { @@ -15031,435 +15048,27 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2023-02-03T06:58:43+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-12-22T06:19:30+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-02-03T06:03:51+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.7", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-02T06:35:11+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-12-22T06:20:34+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { @@ -15482,10 +15091,11 @@ "email": "sebastian@phpunit.de" } ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" }, "funding": [ { @@ -15493,32 +15103,386 @@ "type": "github" } ], - "time": "2024-03-14T16:00:52+00:00" + "time": "2023-02-03T06:59:15+00:00" }, { - "name": "sebastian/type", - "version": "3.2.1", + "name": "sebastian/complexity", + "version": "3.2.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "68ff824baeae169ec9f2137158ee529584553799" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", + "reference": "68ff824baeae169ec9f2137158ee529584553799", "shasum": "" }, "require": { - "php": ">=7.3" + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-main": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-21T08:37:17+00:00" + }, + { + "name": "sebastian/environment", + "version": "6.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984", + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "https://github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-23T08:47:14+00:00" + }, + { + "name": "sebastian/global-state", + "version": "6.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T07:19:19+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-21T08:38:20+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "5.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:08:32+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:06:18+00:00" + }, + { + "name": "sebastian/type", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" } }, "autoload": { @@ -15541,7 +15505,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" }, "funding": [ { @@ -15549,29 +15513,29 @@ "type": "github" } ], - "time": "2023-02-03T06:13:03+00:00" + "time": "2023-02-03T07:10:45+00:00" }, { "name": "sebastian/version", - "version": "3.0.2", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -15594,7 +15558,7 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" }, "funding": [ { @@ -15602,7 +15566,7 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2023-02-07T11:34:05+00:00" }, { "name": "slevomat/coding-standard", From 6cfbf835c7d3789dfb85478f73b9f32e009af213 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Tue, 6 Aug 2024 13:37:53 -0700 Subject: [PATCH 10/12] Migrate phpunit.xml vendor/bin/phpunit --migrate-configuration --- phpunit.xml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index 9d4fa91144..c21353eefb 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,21 +1,14 @@ - - - app/ - - ./tests/Unit @@ -33,4 +26,9 @@ + + + app/ + + From c60bc5cdbe87e517e64ee99fe2af6c41852ffd7b Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Tue, 6 Aug 2024 13:51:44 -0700 Subject: [PATCH 11/12] Change indents back to 2 --- composer.json | 264 +++++++++++++++++++++++++------------------------- 1 file changed, 132 insertions(+), 132 deletions(-) diff --git a/composer.json b/composer.json index 6d44077bb6..5467e94e32 100644 --- a/composer.json +++ b/composer.json @@ -1,135 +1,135 @@ { - "name": "snipe/snipe-it", - "description": "Open source asset management system built on Laravel.", - "keywords": [ - "assets", - "asset-management", - "it-tools", - "inventory", - "laravel" - ], - "license": "AGPL-3.0-or-later", - "type": "project", - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/grokability/laravel-scim-server" - } - ], - "require": { - "php": "^8.1", - "ext-curl": "*", - "ext-fileinfo": "*", - "ext-json": "*", - "ext-mbstring": "*", - "ext-pdo": "*", - "alek13/slack": "^2.0", - "arietimmerman/laravel-scim-server": "dev-master", - "bacon/bacon-qr-code": "^2.0", - "barryvdh/laravel-debugbar": "^3.13", - "barryvdh/laravel-dompdf": "^2.0", - "doctrine/cache": "^1.10", - "doctrine/dbal": "^3.1", - "doctrine/instantiator": "^1.3", - "eduardokum/laravel-mail-auto-embed": "^2.0", - "enshrined/svg-sanitize": "^0.15.0", - "erusev/parsedown": "^1.7", - "guzzlehttp/guzzle": "^7.0.1", - "intervention/image": "^2.5", - "javiereguiluz/easyslugger": "^1.0", - "laravel-notification-channels/google-chat": "^3.0", - "laravel-notification-channels/microsoft-teams": "^1.1", - "laravel/framework": "^10.0", - "laravel/helpers": "^1.4", - "laravel/passport": "^11.0", - "laravel/slack-notification-channel": "^2.3", - "laravel/socialite": "^5.6", - "laravel/tinker": "^2.6", - "laravel/ui": "^4.0", - "laravelcollective/html": "^6.2", - "league/csv": "^9.7", - "league/flysystem-aws-s3-v3": "^3.0", - "livewire/livewire": "^3.5", - "neitanod/forceutf8": "^2.0", - "nesbot/carbon": "^2.32", - "nunomaduro/collision": "^7.0", - "okvpn/clock-lts": "^1.0", - "onelogin/php-saml": "^3.4", - "paragonie/constant_time_encoding": "^2.3", - "paragonie/sodium_compat": "^1.19", - "phpdocumentor/reflection-docblock": "^5.1", - "phpspec/prophecy": "^1.10", - "pragmarx/google2fa-laravel": "^1.3", - "rollbar/rollbar-laravel": "^8.0", - "spatie/laravel-backup": "^8.8", - "spatie/laravel-ignition": "^2.0", - "tecnickcom/tc-lib-barcode": "^1.15", - "tecnickcom/tcpdf": "^6.5", - "unicodeveloper/laravel-password": "^1.0", - "watson/validating": "^8.1" - }, - "suggest": { - "ext-ldap": "*", - "ext-zip": "*", - "ext-exif": "*" - }, - "require-dev": { - "brianium/paratest": "^7.0", - "fakerphp/faker": "^1.16", - "larastan/larastan": "^2.9", - "mockery/mockery": "^1.4", - "nunomaduro/phpinsights": "^2.7", - "php-mock/php-mock-phpunit": "^2.10", - "phpunit/phpunit": "^10.0", - "squizlabs/php_codesniffer": "^3.5", - "symfony/css-selector": "^4.4", - "symfony/dom-crawler": "^4.4", - "vimeo/psalm": "^5.13" - }, - "extra": { - "laravel": { - "dont-discover": [ - "rollbar/rollbar-laravel" - ] - } - }, - "autoload": { - "classmap": [ - "database" - ], - "psr-4": { - "App\\": "app/", - "Database\\Factories\\": "database/factories/", - "Database\\Seeders\\": "database/seeders/" - } - }, - "autoload-dev": { - "classmap": [ - "tests/TestCase.php" - ], - "psr-4": { - "App\\": "app/", - "Tests\\": "tests/" - } - }, - "scripts": { - "post-autoload-dump": [ - "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", - "@php artisan package:discover --ansi", - "@php artisan vendor:publish --force --tag=livewire:assets --ansi" - ], - "post-create-project-cmd": [ - "php artisan key:generate" - ] - }, - "config": { - "preferred-install": "dist", - "sort-packages": true, - "optimize-autoloader": true, - "discard-changes": true, - "process-timeout": 3000, - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true - } + "name": "snipe/snipe-it", + "description": "Open source asset management system built on Laravel.", + "keywords": [ + "assets", + "asset-management", + "it-tools", + "inventory", + "laravel" + ], + "license": "AGPL-3.0-or-later", + "type": "project", + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/grokability/laravel-scim-server" } + ], + "require": { + "php": "^8.1", + "ext-curl": "*", + "ext-fileinfo": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-pdo": "*", + "alek13/slack": "^2.0", + "arietimmerman/laravel-scim-server": "dev-master", + "bacon/bacon-qr-code": "^2.0", + "barryvdh/laravel-debugbar": "^3.13", + "barryvdh/laravel-dompdf": "^2.0", + "doctrine/cache": "^1.10", + "doctrine/dbal": "^3.1", + "doctrine/instantiator": "^1.3", + "eduardokum/laravel-mail-auto-embed": "^2.0", + "enshrined/svg-sanitize": "^0.15.0", + "erusev/parsedown": "^1.7", + "guzzlehttp/guzzle": "^7.0.1", + "intervention/image": "^2.5", + "javiereguiluz/easyslugger": "^1.0", + "laravel-notification-channels/google-chat": "^3.0", + "laravel-notification-channels/microsoft-teams": "^1.1", + "laravel/framework": "^10.0", + "laravel/helpers": "^1.4", + "laravel/passport": "^11.0", + "laravel/slack-notification-channel": "^2.3", + "laravel/socialite": "^5.6", + "laravel/tinker": "^2.6", + "laravel/ui": "^4.0", + "laravelcollective/html": "^6.2", + "league/csv": "^9.7", + "league/flysystem-aws-s3-v3": "^3.0", + "livewire/livewire": "^3.5", + "neitanod/forceutf8": "^2.0", + "nesbot/carbon": "^2.32", + "nunomaduro/collision": "^7.0", + "okvpn/clock-lts": "^1.0", + "onelogin/php-saml": "^3.4", + "paragonie/constant_time_encoding": "^2.3", + "paragonie/sodium_compat": "^1.19", + "phpdocumentor/reflection-docblock": "^5.1", + "phpspec/prophecy": "^1.10", + "pragmarx/google2fa-laravel": "^1.3", + "rollbar/rollbar-laravel": "^8.0", + "spatie/laravel-backup": "^8.8", + "spatie/laravel-ignition": "^2.0", + "tecnickcom/tc-lib-barcode": "^1.15", + "tecnickcom/tcpdf": "^6.5", + "unicodeveloper/laravel-password": "^1.0", + "watson/validating": "^8.1" + }, + "suggest": { + "ext-ldap": "*", + "ext-zip": "*", + "ext-exif": "*" + }, + "require-dev": { + "brianium/paratest": "^7.0", + "fakerphp/faker": "^1.16", + "larastan/larastan": "^2.9", + "mockery/mockery": "^1.4", + "nunomaduro/phpinsights": "^2.7", + "php-mock/php-mock-phpunit": "^2.10", + "phpunit/phpunit": "^10.0", + "squizlabs/php_codesniffer": "^3.5", + "symfony/css-selector": "^4.4", + "symfony/dom-crawler": "^4.4", + "vimeo/psalm": "^5.13" + }, + "extra": { + "laravel": { + "dont-discover": [ + "rollbar/rollbar-laravel" + ] + } + }, + "autoload": { + "classmap": [ + "database" + ], + "psr-4": { + "App\\": "app/", + "Database\\Factories\\": "database/factories/", + "Database\\Seeders\\": "database/seeders/" + } + }, + "autoload-dev": { + "classmap": [ + "tests/TestCase.php" + ], + "psr-4": { + "App\\": "app/", + "Tests\\": "tests/" + } + }, + "scripts": { + "post-autoload-dump": [ + "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", + "@php artisan package:discover --ansi", + "@php artisan vendor:publish --force --tag=livewire:assets --ansi" + ], + "post-create-project-cmd": [ + "php artisan key:generate" + ] + }, + "config": { + "preferred-install": "dist", + "sort-packages": true, + "optimize-autoloader": true, + "discard-changes": true, + "process-timeout": 3000, + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } + } } From d3cb3c03d2e6cdc70c55efb668993fa5bca32cb5 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Tue, 6 Aug 2024 15:01:01 -0700 Subject: [PATCH 12/12] Rerun composer update using php 8.1 --- composer.lock | 68 +++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/composer.lock b/composer.lock index 8e0e934740..f7c46672d3 100644 --- a/composer.lock +++ b/composer.lock @@ -10458,20 +10458,20 @@ }, { "name": "symfony/string", - "version": "v7.1.3", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ea272a882be7f20cad58d5d78c215001617b7f07" + "reference": "ccf9b30251719567bfd46494138327522b9a9446" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ea272a882be7f20cad58d5d78c215001617b7f07", - "reference": "ea272a882be7f20cad58d5d78c215001617b7f07", + "url": "https://api.github.com/repos/symfony/string/zipball/ccf9b30251719567bfd46494138327522b9a9446", + "reference": "ccf9b30251719567bfd46494138327522b9a9446", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -10481,12 +10481,11 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/emoji": "^7.1", - "symfony/error-handler": "^6.4|^7.0", - "symfony/http-client": "^6.4|^7.0", - "symfony/intl": "^6.4|^7.0", + "symfony/error-handler": "^5.4|^6.0|^7.0", + "symfony/http-client": "^5.4|^6.0|^7.0", + "symfony/intl": "^6.2|^7.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^6.4|^7.0" + "symfony/var-exporter": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -10525,7 +10524,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.1.3" + "source": "https://github.com/symfony/string/tree/v6.4.10" }, "funding": [ { @@ -10541,7 +10540,7 @@ "type": "tidelift" } ], - "time": "2024-07-22T10:25:37+00:00" + "time": "2024-07-22T10:21:14+00:00" }, { "name": "symfony/translation", @@ -11860,16 +11859,16 @@ }, { "name": "brianium/paratest", - "version": "v7.4.5", + "version": "v7.3.1", "source": { "type": "git", "url": "https://github.com/paratestphp/paratest.git", - "reference": "d4de825332842a7dee1ff350f0fd6caafa930d79" + "reference": "551f46f52a93177d873f3be08a1649ae886b4a30" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paratestphp/paratest/zipball/d4de825332842a7dee1ff350f0fd6caafa930d79", - "reference": "d4de825332842a7dee1ff350f0fd6caafa930d79", + "url": "https://api.github.com/repos/paratestphp/paratest/zipball/551f46f52a93177d873f3be08a1649ae886b4a30", + "reference": "551f46f52a93177d873f3be08a1649ae886b4a30", "shasum": "" }, "require": { @@ -11877,27 +11876,28 @@ "ext-pcre": "*", "ext-reflection": "*", "ext-simplexml": "*", - "fidry/cpu-core-counter": "^1.1.0", - "jean85/pretty-package-versions": "^2.0.6", - "php": "~8.2.0 || ~8.3.0", - "phpunit/php-code-coverage": "^10.1.14 || ^11.0.3", - "phpunit/php-file-iterator": "^4.1.0 || ^5.0.0", - "phpunit/php-timer": "^6.0.0 || ^7.0.0", - "phpunit/phpunit": "^10.5.20 || ^11.1.3", - "sebastian/environment": "^6.1.0 || ^7.1.0", - "symfony/console": "^6.4.7 || ^7.1.0", - "symfony/process": "^6.4.7 || ^7.1.0" + "fidry/cpu-core-counter": "^0.5.1 || ^1.0.0", + "jean85/pretty-package-versions": "^2.0.5", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "phpunit/php-code-coverage": "^10.1.7", + "phpunit/php-file-iterator": "^4.1.0", + "phpunit/php-timer": "^6.0", + "phpunit/phpunit": "^10.4.2", + "sebastian/environment": "^6.0.1", + "symfony/console": "^6.3.4 || ^7.0.0", + "symfony/process": "^6.3.4 || ^7.0.0" }, "require-dev": { "doctrine/coding-standard": "^12.0.0", "ext-pcov": "*", "ext-posix": "*", - "phpstan/phpstan": "^1.11.2", - "phpstan/phpstan-deprecation-rules": "^1.2.0", - "phpstan/phpstan-phpunit": "^1.4.0", - "phpstan/phpstan-strict-rules": "^1.6.0", - "squizlabs/php_codesniffer": "^3.10.1", - "symfony/filesystem": "^6.4.3 || ^7.1.0" + "infection/infection": "^0.27.6", + "phpstan/phpstan": "^1.10.40", + "phpstan/phpstan-deprecation-rules": "^1.1.4", + "phpstan/phpstan-phpunit": "^1.3.15", + "phpstan/phpstan-strict-rules": "^1.5.2", + "squizlabs/php_codesniffer": "^3.7.2", + "symfony/filesystem": "^6.3.1 || ^7.0.0" }, "bin": [ "bin/paratest", @@ -11938,7 +11938,7 @@ ], "support": { "issues": "https://github.com/paratestphp/paratest/issues", - "source": "https://github.com/paratestphp/paratest/tree/v7.4.5" + "source": "https://github.com/paratestphp/paratest/tree/v7.3.1" }, "funding": [ { @@ -11950,7 +11950,7 @@ "type": "paypal" } ], - "time": "2024-05-31T13:59:20+00:00" + "time": "2023-10-31T09:24:17+00:00" }, { "name": "clue/ndjson-react",