diff --git a/.github/workflows/phpunit-test.yml b/.github/workflows/phpunit-test.yml
index cb8b82a18..8110793ef 100644
--- a/.github/workflows/phpunit-test.yml
+++ b/.github/workflows/phpunit-test.yml
@@ -56,7 +56,7 @@ jobs:
- name: Clear Application Cache
run: php artisan optimize:clear
- name: Run PHPUnit Tests
- run: ./vendor/bin/pest --coverage
+ run: ./vendor/bin/pest --compact --coverage
env:
DB_CONNECTION: mysql
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
diff --git a/app/Http/Requests/MassUpsertPlaylistTorrentRequest.php b/app/Http/Requests/MassUpsertPlaylistTorrentRequest.php
index c1a8c5a00..4edf09305 100644
--- a/app/Http/Requests/MassUpsertPlaylistTorrentRequest.php
+++ b/app/Http/Requests/MassUpsertPlaylistTorrentRequest.php
@@ -33,7 +33,7 @@ class MassUpsertPlaylistTorrentRequest extends FormRequest
/**
* Get the validation rules that apply to the request.
*/
- public function rules(Request $request): array
+ public function rules(): array
{
return [
'playlist_id' => [
diff --git a/app/Http/Requests/Staff/DestroyRegionRequest.php b/app/Http/Requests/Staff/DestroyRegionRequest.php
index 2192057dc..f59fb3d93 100644
--- a/app/Http/Requests/Staff/DestroyRegionRequest.php
+++ b/app/Http/Requests/Staff/DestroyRegionRequest.php
@@ -13,8 +13,8 @@
namespace App\Http\Requests\Staff;
+use App\Models\Region;
use Illuminate\Foundation\Http\FormRequest;
-use Illuminate\Http\Request;
use Illuminate\Validation\Rule;
class DestroyRegionRequest extends FormRequest
@@ -22,12 +22,12 @@ class DestroyRegionRequest extends FormRequest
/**
* Get the validation rules that apply to the request.
*/
- public function rules(Request $request): array
+ public function rules(Region $region): array
{
return [
'region_id' => [
'required',
- Rule::exists('regions', 'id')->whereNot('id', $request->route('region')->id),
+ Rule::exists('regions', 'id')->whereNot('id', $region->id),
],
];
}
diff --git a/app/Http/Requests/StoreRequestFillRequest.php b/app/Http/Requests/StoreRequestFillRequest.php
index 095d5ed0a..6d7815951 100644
--- a/app/Http/Requests/StoreRequestFillRequest.php
+++ b/app/Http/Requests/StoreRequestFillRequest.php
@@ -29,7 +29,7 @@ class StoreRequestFillRequest extends FormRequest
/**
* Get the validation rules that apply to the request.
*/
- public function rules(Request $request): array
+ public function rules(): array
{
return [
'torrent_id' => [
diff --git a/app/Http/Requests/StoreSubtitleRequest.php b/app/Http/Requests/StoreSubtitleRequest.php
index 93ffcb42a..caa874832 100644
--- a/app/Http/Requests/StoreSubtitleRequest.php
+++ b/app/Http/Requests/StoreSubtitleRequest.php
@@ -30,7 +30,7 @@ class StoreSubtitleRequest extends FormRequest
/**
* Get the validation rules that apply to the request.
*/
- public function rules(Request $request): array
+ public function rules(): array
{
return [
'subtitle_file' => [
diff --git a/app/Http/Requests/StoreTicketRequest.php b/app/Http/Requests/StoreTicketRequest.php
index 7ddea344e..d7d13de4c 100644
--- a/app/Http/Requests/StoreTicketRequest.php
+++ b/app/Http/Requests/StoreTicketRequest.php
@@ -30,7 +30,7 @@ class StoreTicketRequest extends FormRequest
/**
* Get the validation rules that apply to the request.
*/
- public function rules(Request $request): array
+ public function rules(): array
{
return [
'category_id' => [
diff --git a/app/Http/Requests/UpdatePlaylistRequest.php b/app/Http/Requests/UpdatePlaylistRequest.php
index 1d378452f..7ad81d588 100644
--- a/app/Http/Requests/UpdatePlaylistRequest.php
+++ b/app/Http/Requests/UpdatePlaylistRequest.php
@@ -33,7 +33,7 @@ class UpdatePlaylistRequest extends FormRequest
/**
* Get the validation rules that apply to the request.
*/
- public function rules(Request $request): array
+ public function rules(): array
{
$this->sanitize();
diff --git a/app/Http/Requests/UpdateSubtitleRequest.php b/app/Http/Requests/UpdateSubtitleRequest.php
index 660bbdb08..d07bf93dd 100644
--- a/app/Http/Requests/UpdateSubtitleRequest.php
+++ b/app/Http/Requests/UpdateSubtitleRequest.php
@@ -30,7 +30,7 @@ class UpdateSubtitleRequest extends FormRequest
/**
* Get the validation rules that apply to the request.
*/
- public function rules(Request $request): array
+ public function rules(): array
{
return [
'language_id' => [
diff --git a/phpunit.xml b/phpunit.xml
index ba380bcf7..8e14ae3c4 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -19,9 +19,8 @@
-->
-
-
-
+
+
diff --git a/tests/Feature/Console/Commands/AutoBanDisposableUsersTest.php b/tests/Feature/Console/Commands/AutoBanDisposableUsersTest.php
index acf1f3991..ff52d9bf6 100644
--- a/tests/Feature/Console/Commands/AutoBanDisposableUsersTest.php
+++ b/tests/Feature/Console/Commands/AutoBanDisposableUsersTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoBanDisposableUsers
diff --git a/tests/Feature/Console/Commands/AutoBonAllocationTest.php b/tests/Feature/Console/Commands/AutoBonAllocationTest.php
index e0f543066..e7947b4bc 100644
--- a/tests/Feature/Console/Commands/AutoBonAllocationTest.php
+++ b/tests/Feature/Console/Commands/AutoBonAllocationTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoBonAllocation
diff --git a/tests/Feature/Console/Commands/AutoCorrectHistoryTest.php b/tests/Feature/Console/Commands/AutoCorrectHistoryTest.php
index 7daf5e1eb..c4bfa77c0 100644
--- a/tests/Feature/Console/Commands/AutoCorrectHistoryTest.php
+++ b/tests/Feature/Console/Commands/AutoCorrectHistoryTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoCorrectHistory
diff --git a/tests/Feature/Console/Commands/AutoDeactivateWarningTest.php b/tests/Feature/Console/Commands/AutoDeactivateWarningTest.php
index a53e25cbc..9b773290f 100644
--- a/tests/Feature/Console/Commands/AutoDeactivateWarningTest.php
+++ b/tests/Feature/Console/Commands/AutoDeactivateWarningTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoDeactivateWarning
diff --git a/tests/Feature/Console/Commands/AutoDisableInactiveUsersTest.php b/tests/Feature/Console/Commands/AutoDisableInactiveUsersTest.php
index 050f97925..19f722c7c 100644
--- a/tests/Feature/Console/Commands/AutoDisableInactiveUsersTest.php
+++ b/tests/Feature/Console/Commands/AutoDisableInactiveUsersTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoDisableInactiveUsers
diff --git a/tests/Feature/Console/Commands/AutoFlushPeersTest.php b/tests/Feature/Console/Commands/AutoFlushPeersTest.php
index 7b1334d34..8cffbb0df 100644
--- a/tests/Feature/Console/Commands/AutoFlushPeersTest.php
+++ b/tests/Feature/Console/Commands/AutoFlushPeersTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoFlushPeers
diff --git a/tests/Feature/Console/Commands/AutoGraveyardTest.php b/tests/Feature/Console/Commands/AutoGraveyardTest.php
index 04f9d4947..5be6cea2c 100644
--- a/tests/Feature/Console/Commands/AutoGraveyardTest.php
+++ b/tests/Feature/Console/Commands/AutoGraveyardTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoGraveyard
diff --git a/tests/Feature/Console/Commands/AutoGroupTest.php b/tests/Feature/Console/Commands/AutoGroupTest.php
index b2df51836..d27a7bf5a 100644
--- a/tests/Feature/Console/Commands/AutoGroupTest.php
+++ b/tests/Feature/Console/Commands/AutoGroupTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoGroup
diff --git a/tests/Feature/Console/Commands/AutoHighspeedTagTest.php b/tests/Feature/Console/Commands/AutoHighspeedTagTest.php
index bc7cddeb8..3347a194f 100644
--- a/tests/Feature/Console/Commands/AutoHighspeedTagTest.php
+++ b/tests/Feature/Console/Commands/AutoHighspeedTagTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoHighspeedTag
diff --git a/tests/Feature/Console/Commands/AutoNerdStatTest.php b/tests/Feature/Console/Commands/AutoNerdStatTest.php
index c283c086f..e51f1c62a 100644
--- a/tests/Feature/Console/Commands/AutoNerdStatTest.php
+++ b/tests/Feature/Console/Commands/AutoNerdStatTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoNerdStat
diff --git a/tests/Feature/Console/Commands/AutoPreWarningTest.php b/tests/Feature/Console/Commands/AutoPreWarningTest.php
index bc4c0a648..db893c0dd 100644
--- a/tests/Feature/Console/Commands/AutoPreWarningTest.php
+++ b/tests/Feature/Console/Commands/AutoPreWarningTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoPreWarning
diff --git a/tests/Feature/Console/Commands/AutoRecycleAuditsTest.php b/tests/Feature/Console/Commands/AutoRecycleAuditsTest.php
index dee837315..552eaea3d 100644
--- a/tests/Feature/Console/Commands/AutoRecycleAuditsTest.php
+++ b/tests/Feature/Console/Commands/AutoRecycleAuditsTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoRecycleAudits
diff --git a/tests/Feature/Console/Commands/AutoRecycleClaimedTorrentRequestsTest.php b/tests/Feature/Console/Commands/AutoRecycleClaimedTorrentRequestsTest.php
index f00d21ff0..079662c9e 100644
--- a/tests/Feature/Console/Commands/AutoRecycleClaimedTorrentRequestsTest.php
+++ b/tests/Feature/Console/Commands/AutoRecycleClaimedTorrentRequestsTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoRecycleClaimedTorrentRequests
diff --git a/tests/Feature/Console/Commands/AutoRecycleFailedLoginsTest.php b/tests/Feature/Console/Commands/AutoRecycleFailedLoginsTest.php
index 9594a6ab8..5284a755d 100644
--- a/tests/Feature/Console/Commands/AutoRecycleFailedLoginsTest.php
+++ b/tests/Feature/Console/Commands/AutoRecycleFailedLoginsTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoRecycleFailedLogins
diff --git a/tests/Feature/Console/Commands/AutoRecycleInvitesTest.php b/tests/Feature/Console/Commands/AutoRecycleInvitesTest.php
index 88f18f756..61c84c93a 100644
--- a/tests/Feature/Console/Commands/AutoRecycleInvitesTest.php
+++ b/tests/Feature/Console/Commands/AutoRecycleInvitesTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoRecycleInvites
diff --git a/tests/Feature/Console/Commands/AutoRefundDownloadTest.php b/tests/Feature/Console/Commands/AutoRefundDownloadTest.php
index 7364f38dc..53480cdea 100644
--- a/tests/Feature/Console/Commands/AutoRefundDownloadTest.php
+++ b/tests/Feature/Console/Commands/AutoRefundDownloadTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoRefundDownload
diff --git a/tests/Feature/Console/Commands/AutoRemoveFeaturedTorrentTest.php b/tests/Feature/Console/Commands/AutoRemoveFeaturedTorrentTest.php
index 13e8f73a8..89de3d38a 100644
--- a/tests/Feature/Console/Commands/AutoRemoveFeaturedTorrentTest.php
+++ b/tests/Feature/Console/Commands/AutoRemoveFeaturedTorrentTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoRemoveFeaturedTorrent
diff --git a/tests/Feature/Console/Commands/AutoRemovePersonalFreeleechTest.php b/tests/Feature/Console/Commands/AutoRemovePersonalFreeleechTest.php
index f7f1579ba..226c90cde 100644
--- a/tests/Feature/Console/Commands/AutoRemovePersonalFreeleechTest.php
+++ b/tests/Feature/Console/Commands/AutoRemovePersonalFreeleechTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoRemovePersonalFreeleech
diff --git a/tests/Feature/Console/Commands/AutoRemoveTimedTorrentBuffsTest.php b/tests/Feature/Console/Commands/AutoRemoveTimedTorrentBuffsTest.php
index 34aa891d7..2f592986e 100644
--- a/tests/Feature/Console/Commands/AutoRemoveTimedTorrentBuffsTest.php
+++ b/tests/Feature/Console/Commands/AutoRemoveTimedTorrentBuffsTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoRemoveTimedTorrentBuffs
diff --git a/tests/Feature/Console/Commands/AutoResetUserFlushesTest.php b/tests/Feature/Console/Commands/AutoResetUserFlushesTest.php
index 40639a90b..412a22b11 100644
--- a/tests/Feature/Console/Commands/AutoResetUserFlushesTest.php
+++ b/tests/Feature/Console/Commands/AutoResetUserFlushesTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoResetUserFlushes
diff --git a/tests/Feature/Console/Commands/AutoSoftDeleteDisabledUsersTest.php b/tests/Feature/Console/Commands/AutoSoftDeleteDisabledUsersTest.php
index 167316449..fff108f81 100644
--- a/tests/Feature/Console/Commands/AutoSoftDeleteDisabledUsersTest.php
+++ b/tests/Feature/Console/Commands/AutoSoftDeleteDisabledUsersTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoSoftDeleteDisabledUsers
diff --git a/tests/Feature/Console/Commands/AutoStatsClientsTest.php b/tests/Feature/Console/Commands/AutoStatsClientsTest.php
index 9feb2d32a..71c6481d8 100644
--- a/tests/Feature/Console/Commands/AutoStatsClientsTest.php
+++ b/tests/Feature/Console/Commands/AutoStatsClientsTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoStatsClients
diff --git a/tests/Feature/Console/Commands/AutoTorrentBalanceTest.php b/tests/Feature/Console/Commands/AutoTorrentBalanceTest.php
index c383795e7..9d997ad04 100644
--- a/tests/Feature/Console/Commands/AutoTorrentBalanceTest.php
+++ b/tests/Feature/Console/Commands/AutoTorrentBalanceTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoTorrentBalance
diff --git a/tests/Feature/Console/Commands/AutoWarningTest.php b/tests/Feature/Console/Commands/AutoWarningTest.php
index 66a3dca44..5139f0c05 100644
--- a/tests/Feature/Console/Commands/AutoWarningTest.php
+++ b/tests/Feature/Console/Commands/AutoWarningTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\AutoWarning
diff --git a/tests/Feature/Console/Commands/CheckForStaleTicketsTest.php b/tests/Feature/Console/Commands/CheckForStaleTicketsTest.php
index d6e526cfb..6b6667c9d 100644
--- a/tests/Feature/Console/Commands/CheckForStaleTicketsTest.php
+++ b/tests/Feature/Console/Commands/CheckForStaleTicketsTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\CheckForStaleTickets
diff --git a/tests/Feature/Console/Commands/ClearCacheTest.php b/tests/Feature/Console/Commands/ClearCacheTest.php
index c1979bb37..c6bfadc95 100644
--- a/tests/Feature/Console/Commands/ClearCacheTest.php
+++ b/tests/Feature/Console/Commands/ClearCacheTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\ClearCache
diff --git a/tests/Feature/Console/Commands/DbDumpTest.php b/tests/Feature/Console/Commands/DbDumpTest.php
index 8f5d30248..ef68f24eb 100644
--- a/tests/Feature/Console/Commands/DbDumpTest.php
+++ b/tests/Feature/Console/Commands/DbDumpTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\DbDump
diff --git a/tests/Feature/Console/Commands/DbLoadTest.php b/tests/Feature/Console/Commands/DbLoadTest.php
index c77482a7f..4742bd65e 100644
--- a/tests/Feature/Console/Commands/DbLoadTest.php
+++ b/tests/Feature/Console/Commands/DbLoadTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\DbLoad
diff --git a/tests/Feature/Console/Commands/EmailBlacklistUpdateTest.php b/tests/Feature/Console/Commands/EmailBlacklistUpdateTest.php
index 19e8d2bef..0ae23d138 100644
--- a/tests/Feature/Console/Commands/EmailBlacklistUpdateTest.php
+++ b/tests/Feature/Console/Commands/EmailBlacklistUpdateTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\EmailBlacklistUpdate
diff --git a/tests/Feature/Console/Commands/FetchReleaseYearsTest.php b/tests/Feature/Console/Commands/FetchReleaseYearsTest.php
index 2262ae8d1..2899b5b65 100644
--- a/tests/Feature/Console/Commands/FetchReleaseYearsTest.php
+++ b/tests/Feature/Console/Commands/FetchReleaseYearsTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\FetchReleaseYears
diff --git a/tests/Feature/Console/Commands/GitUpdaterTest.php b/tests/Feature/Console/Commands/GitUpdaterTest.php
index 63b197c45..5e48aff8a 100644
--- a/tests/Feature/Console/Commands/GitUpdaterTest.php
+++ b/tests/Feature/Console/Commands/GitUpdaterTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\GitUpdater
diff --git a/tests/Feature/Console/Commands/SetCacheTest.php b/tests/Feature/Console/Commands/SetCacheTest.php
index 20a8339b7..c6d1325e9 100644
--- a/tests/Feature/Console/Commands/SetCacheTest.php
+++ b/tests/Feature/Console/Commands/SetCacheTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\SetCache
diff --git a/tests/Feature/Console/Commands/SyncPeersTest.php b/tests/Feature/Console/Commands/SyncPeersTest.php
index 93983c43c..fc3374cb6 100644
--- a/tests/Feature/Console/Commands/SyncPeersTest.php
+++ b/tests/Feature/Console/Commands/SyncPeersTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\SyncPeers
diff --git a/tests/Feature/Console/Commands/SyncTorrentSeasonEpisodeTest.php b/tests/Feature/Console/Commands/SyncTorrentSeasonEpisodeTest.php
index f1406f37b..81e2fc520 100644
--- a/tests/Feature/Console/Commands/SyncTorrentSeasonEpisodeTest.php
+++ b/tests/Feature/Console/Commands/SyncTorrentSeasonEpisodeTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\SyncTorrentSeasonEpisode
diff --git a/tests/Feature/Console/Commands/TestMailSettingsTest.php b/tests/Feature/Console/Commands/TestMailSettingsTest.php
index 9e823b3b3..a187da284 100644
--- a/tests/Feature/Console/Commands/TestMailSettingsTest.php
+++ b/tests/Feature/Console/Commands/TestMailSettingsTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\TestMailSettings
diff --git a/tests/Feature/Console/Commands/VendorCleanupTest.php b/tests/Feature/Console/Commands/VendorCleanupTest.php
index 7decbdf60..6b2f64d1e 100644
--- a/tests/Feature/Console/Commands/VendorCleanupTest.php
+++ b/tests/Feature/Console/Commands/VendorCleanupTest.php
@@ -1,4 +1,15 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
/**
* @see \App\Console\Commands\VendorCleanup
diff --git a/tests/Feature/Http/Controllers/API/ChatControllerTest.php b/tests/Feature/Http/Controllers/API/ChatControllerTest.php
index 1cf27039e..8a7bdbcad 100644
--- a/tests/Feature/Http/Controllers/API/ChatControllerTest.php
+++ b/tests/Feature/Http/Controllers/API/ChatControllerTest.php
@@ -1,12 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Bot;
+use App\Models\User;
+use App\Models\UserAudible;
+use App\Models\UserEcho;
test('audibles returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get('api/chat/audibles');
@@ -18,8 +32,8 @@ test('audibles returns an ok response', function (): void {
test('bot messages returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $bot = \App\Models\Bot::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $bot = Bot::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get('api/chat/bot/{bot_id}');
@@ -31,7 +45,7 @@ test('bot messages returns an ok response', function (): void {
test('bots returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get('api/chat/bots');
@@ -43,7 +57,7 @@ test('bots returns an ok response', function (): void {
test('config returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get('api/chat/config');
@@ -55,10 +69,10 @@ test('config returns an ok response', function (): void {
test('create message returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $bots = \App\Models\Bot::factory()->times(3)->create();
- $userEchos = \App\Models\UserEcho::factory()->times(3)->create();
- $userAudibles = \App\Models\UserAudible::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $bots = Bot::factory()->times(3)->create();
+ $userEchos = UserEcho::factory()->times(3)->create();
+ $userAudibles = UserAudible::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post('api/chat/messages', [
// TODO: send request data
@@ -72,9 +86,9 @@ test('create message returns an ok response', function (): void {
test('delete bot echo returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $userEchos = \App\Models\UserEcho::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $userEchos = UserEcho::factory()->times(3)->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post('api/chat/echoes/{user_id}/delete/bot', [
// TODO: send request data
@@ -88,7 +102,7 @@ test('delete bot echo returns an ok response', function (): void {
test('delete message returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post('api/chat/message/{id}/delete', [
// TODO: send request data
@@ -102,9 +116,9 @@ test('delete message returns an ok response', function (): void {
test('delete room echo returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $userEchos = \App\Models\UserEcho::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $userEchos = UserEcho::factory()->times(3)->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post('api/chat/echoes/{user_id}/delete/chatroom', [
// TODO: send request data
@@ -118,9 +132,9 @@ test('delete room echo returns an ok response', function (): void {
test('delete target echo returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $userEchos = \App\Models\UserEcho::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $userEchos = UserEcho::factory()->times(3)->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post('api/chat/echoes/{user_id}/delete/target', [
// TODO: send request data
@@ -134,8 +148,8 @@ test('delete target echo returns an ok response', function (): void {
test('echoes returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get('api/chat/echoes');
@@ -147,7 +161,7 @@ test('echoes returns an ok response', function (): void {
test('messages returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get('api/chat/messages/{room_id}');
@@ -159,7 +173,7 @@ test('messages returns an ok response', function (): void {
test('private messages returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get('api/chat/private/messages/{target_id}');
@@ -171,7 +185,7 @@ test('private messages returns an ok response', function (): void {
test('rooms returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get('api/chat/rooms');
@@ -183,7 +197,7 @@ test('rooms returns an ok response', function (): void {
test('statuses returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get('api/chat/statuses');
@@ -195,9 +209,9 @@ test('statuses returns an ok response', function (): void {
test('toggle bot audible returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $userAudibles = \App\Models\UserAudible::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $userAudibles = UserAudible::factory()->times(3)->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post('api/chat/audibles/{user_id}/toggle/bot', [
// TODO: send request data
@@ -211,9 +225,9 @@ test('toggle bot audible returns an ok response', function (): void {
test('toggle room audible returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $userAudibles = \App\Models\UserAudible::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $userAudibles = UserAudible::factory()->times(3)->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post('api/chat/audibles/{user_id}/toggle/chatroom', [
// TODO: send request data
@@ -227,9 +241,9 @@ test('toggle room audible returns an ok response', function (): void {
test('toggle target audible returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $userAudibles = \App\Models\UserAudible::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $userAudibles = UserAudible::factory()->times(3)->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post('api/chat/audibles/{user_id}/toggle/target', [
// TODO: send request data
@@ -243,8 +257,8 @@ test('toggle target audible returns an ok response', function (): void {
test('update user chat status returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post('api/chat/user/{id}/status', [
// TODO: send request data
@@ -258,9 +272,9 @@ test('update user chat status returns an ok response', function (): void {
test('update user room returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $userEchos = \App\Models\UserEcho::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $userEchos = UserEcho::factory()->times(3)->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post('api/chat/user/{id}/chatroom', [
// TODO: send request data
@@ -274,8 +288,8 @@ test('update user room returns an ok response', function (): void {
test('update user target returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post('api/chat/user/{id}/target', [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/API/TorrentControllerTest.php b/tests/Feature/Http/Controllers/API/TorrentControllerTest.php
index 697df7857..c6c78c1ef 100644
--- a/tests/Feature/Http/Controllers/API/TorrentControllerTest.php
+++ b/tests/Feature/Http/Controllers/API/TorrentControllerTest.php
@@ -1,142 +1,78 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
*/
-final class TorrentControllerTest extends TestCase
-{
- #[Test]
- public function filter_returns_an_ok_response(): void
- {
- $user = User::factory()->create();
- $response = $this->actingAs($user, 'api')->getJson('api/torrents/filter');
+use App\Models\Category;
+use App\Models\Torrent;
+use App\Models\User;
- $response->assertOk()
- ->assertJson([
- 'data' => [],
- 'links' => [
- 'first' => null,
- 'last' => null,
- 'prev' => null,
- 'next' => null,
- 'self' => sprintf('%s/api/torrents', appurl()),
- ],
- 'meta' => [
- 'path' => sprintf('%s/api/torrents/filter', appurl()),
- 'per_page' => 25,
- 'next_cursor' => null,
- 'prev_cursor' => null,
- ],
- ]);
- }
+test('filter returns an ok response', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- #[Test]
- public function index_returns_an_ok_response(): void
- {
- $user = User::factory()->create();
+ $response = $this->actingAs($user, 'api')->getJson('api/torrents/filter');
+ $response->assertOk();
+ $response->assertJsonStructure([
+ // TODO: compare expected response data
+ ]);
- $response = $this->actingAs($user, 'api')->getJson(route('api.torrents.index'));
+ // TODO: perform additional assertions
+});
- $response->assertOk()
- ->assertJson([
- 'data' => [],
- 'links' => [
- 'first' => sprintf('%s/api/torrents?page=1', appurl()),
- 'last' => sprintf('%s/api/torrents?page=1', appurl()),
- 'prev' => null,
- 'next' => null,
- 'self' => sprintf('%s/api/torrents', appurl()),
- ],
- 'meta' => [
- 'current_page' => 1,
- 'from' => null,
- 'last_page' => 1,
- 'path' => sprintf('%s/api/torrents', appurl()),
- 'per_page' => 25,
- 'to' => null,
- 'total' => 0,
- ],
- ]);
- }
+test('index returns an ok response', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- #[Test]
- public function show_returns_an_ok_response(): void
- {
- $user = User::factory()->create();
+ $torrents = Torrent::factory()->times(3)->create();
- $torrent = Torrent::factory()->create([
- 'user_id' => $user->id,
- 'status' => Torrent::APPROVED,
- ]);
+ $response = $this->getJson(route('api.torrents.index'));
- $response = $this->actingAs($user, 'api')->getJson(sprintf('api/torrents/%s', $torrent->id));
+ $response->assertOk();
+ $response->assertJsonStructure([
+ // TODO: compare expected response data
+ ]);
- $response->assertOk()
- ->assertJson([
- 'type' => 'torrent',
- 'id' => $torrent->id,
- ]);
- }
+ // TODO: perform additional assertions
+});
- #[Test]
- public function store_returns_an_ok_response(): void
- {
- $this->seed(UsersTableSeeder::class);
- $this->seed(ChatroomTableSeeder::class);
- $this->seed(BotsTableSeeder::class);
+test('show returns an ok response', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = User::factory()->create();
+ $torrent = Torrent::factory()->create();
- $category = Category::factory()->create();
- $type = Type::factory()->create();
- $resolution = Resolution::factory()->create();
+ $response = $this->getJson('api/torrents/{id}');
- $torrent = Torrent::factory()->make();
+ $response->assertOk();
+ $response->assertJsonStructure([
+ // TODO: compare expected response data
+ ]);
- $response = $this->actingAs($user, 'api')->postJson('api/torrents/upload', [
- 'torrent' => new UploadedFile(
- base_path('tests/Resources/Pony Music - Mind Fragments (2014).torrent'),
- 'Pony Music - Mind Fragments (2014).torrent'
- ),
- 'category_id' => $category->id,
- 'name' => 'Pony Music - Mind Fragments (2014)',
- 'description' => 'One song that represents the elements of being lost, abandoned, sadness and innocence.',
- 'imdb' => $torrent->imdb,
- 'tvdb' => $torrent->tvdb,
- 'tmdb' => $torrent->tmdb,
- 'mal' => $torrent->mal,
- 'igdb' => $torrent->igdb,
- 'type_id' => $type->id,
- 'resolution_id' => $resolution->id,
- 'anonymous' => $torrent->anon,
- 'stream' => $torrent->stream,
- 'sd' => $torrent->sd,
- 'internal' => $torrent->internal,
- 'featured' => false,
- 'doubleup' => $torrent->doubleup,
- 'free' => $torrent->free,
- 'sticky' => $torrent->sticky,
- ]);
+ // TODO: perform additional assertions
+});
- $response->assertOk()
- ->assertJson([
- 'success' => true,
- 'message' => 'Torrent uploaded successfully.',
- ]);
- }
-}
+test('store returns an ok response', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
+
+ $category = Category::factory()->create();
+ $user = User::factory()->create();
+
+ $response = $this->postJson('api/torrents/upload', [
+ // TODO: send request data
+ ]);
+
+ $response->assertOk();
+ $response->assertJsonStructure([
+ // TODO: compare expected response data
+ ]);
+
+ // TODO: perform additional assertions
+});
+
+// test cases...
diff --git a/tests/Feature/Http/Controllers/API/TorrentControllerTest.shift.php b/tests/Feature/Http/Controllers/API/TorrentControllerTest.shift.php
deleted file mode 100644
index 59c4ba0b6..000000000
--- a/tests/Feature/Http/Controllers/API/TorrentControllerTest.shift.php
+++ /dev/null
@@ -1,66 +0,0 @@
-markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $response = $this->getJson('api/torrents/filter');
-
- $response->assertOk();
- $response->assertJsonStructure([
- // TODO: compare expected response data
- ]);
-
- // TODO: perform additional assertions
-});
-
-test('index returns an ok response', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $torrents = \App\Models\Torrent::factory()->times(3)->create();
-
- $response = $this->getJson(route('api.torrents.index'));
-
- $response->assertOk();
- $response->assertJsonStructure([
- // TODO: compare expected response data
- ]);
-
- // TODO: perform additional assertions
-});
-
-test('show returns an ok response', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $torrent = \App\Models\Torrent::factory()->create();
-
- $response = $this->getJson('api/torrents/{id}');
-
- $response->assertOk();
- $response->assertJsonStructure([
- // TODO: compare expected response data
- ]);
-
- // TODO: perform additional assertions
-});
-
-test('store returns an ok response', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $category = \App\Models\Category::factory()->create();
- $user = \App\Models\User::factory()->create();
-
- $response = $this->postJson('api/torrents/upload', [
- // TODO: send request data
- ]);
-
- $response->assertOk();
- $response->assertJsonStructure([
- // TODO: compare expected response data
- ]);
-
- // TODO: perform additional assertions
-});
-
-// test cases...
diff --git a/tests/Feature/Http/Controllers/AnnounceControllerTest.php b/tests/Feature/Http/Controllers/AnnounceControllerTest.php
index 82d5002b6..267c287c9 100644
--- a/tests/Feature/Http/Controllers/AnnounceControllerTest.php
+++ b/tests/Feature/Http/Controllers/AnnounceControllerTest.php
@@ -1,54 +1,13 @@
markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-use PHPUnit\Framework\Attributes\Test;
-use App\Models\Torrent;
-use App\Models\User;
-use Database\Seeders\GroupsTableSeeder;
-use Tests\TestCase;
+ $response = $this->get(route('announce', ['passkey' => $passkey]));
-/**
- * @see \App\Http\Controllers\AnnounceController
- */
-final class AnnounceControllerTest extends TestCase
-{
- #[Test]
- public function announce_returns_an_ok_response(): void
- {
- $this->seed(GroupsTableSeeder::class);
+ $response->assertOk();
- $user = User::factory()->create([
- 'can_download' => true,
- ]);
+ // TODO: perform additional assertions
+});
- $info_hash = '16679042096019090177'; // 20 bytes
- $peer_id = '19045931013802080695'; // 20 bytes
-
- Torrent::factory()->create([
- 'info_hash' => $info_hash,
- 'status' => Torrent::APPROVED,
- ]);
-
- $headers = [
- 'accept-language' => null,
- 'referer' => null,
- 'accept-charset' => null,
- 'want-digest' => null,
- ];
-
- $response = $this->withHeaders($headers)->get(route('announce', [
- 'passkey' => $user->passkey,
- 'info_hash' => $info_hash,
- 'peer_id' => $peer_id,
- 'port' => 7022,
- 'left' => 0,
- 'uploaded' => 1,
- 'downloaded' => 1,
- 'compact' => 1,
- ]))
- ->assertOk();
-
- $this->assertArrayNotHasKey('failure reason', [$response->getContent()]);
- }
-}
+// test cases...
diff --git a/tests/Feature/Http/Controllers/AnnounceControllerTest.shift.php b/tests/Feature/Http/Controllers/AnnounceControllerTest.shift.php
deleted file mode 100644
index 267c287c9..000000000
--- a/tests/Feature/Http/Controllers/AnnounceControllerTest.shift.php
+++ /dev/null
@@ -1,13 +0,0 @@
-markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $response = $this->get(route('announce', ['passkey' => $passkey]));
-
- $response->assertOk();
-
- // TODO: perform additional assertions
-});
-
-// test cases...
diff --git a/tests/Feature/Http/Controllers/ApprovedRequestFillControllerTest.php b/tests/Feature/Http/Controllers/ApprovedRequestFillControllerTest.php
index 6ef863368..3b33f4dec 100644
--- a/tests/Feature/Http/Controllers/ApprovedRequestFillControllerTest.php
+++ b/tests/Feature/Http/Controllers/ApprovedRequestFillControllerTest.php
@@ -1,12 +1,24 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\TorrentRequest;
+use App\Models\User;
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequest = \App\Models\TorrentRequest::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequest = TorrentRequest::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('requests.approved_fills.destroy', [$torrentRequest]));
@@ -19,8 +31,8 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequest = \App\Models\TorrentRequest::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequest = TorrentRequest::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -32,8 +44,8 @@ test('destroy aborts with a 403', function (): void {
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequest = \App\Models\TorrentRequest::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequest = TorrentRequest::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('requests.approved_fills.store', [$torrentRequest]), [
// TODO: send request data
@@ -47,8 +59,8 @@ test('store returns an ok response', function (): void {
test('store aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequest = \App\Models\TorrentRequest::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequest = TorrentRequest::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/ArticleControllerTest.php b/tests/Feature/Http/Controllers/ArticleControllerTest.php
index 91fa1c839..b87198bb4 100644
--- a/tests/Feature/Http/Controllers/ArticleControllerTest.php
+++ b/tests/Feature/Http/Controllers/ArticleControllerTest.php
@@ -1,44 +1,47 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-namespace Tests\Feature\Http\Controllers;
-
-use PHPUnit\Framework\Attributes\Test;
use App\Models\Article;
use App\Models\User;
-use Database\Seeders\GroupsTableSeeder;
-use Tests\TestCase;
-/**
- * @see \App\Http\Controllers\ArticleController
- */
-final class ArticleControllerTest extends TestCase
-{
- #[Test]
- public function index_returns_an_ok_response(): void
- {
- $this->seed(GroupsTableSeeder::class);
+test('index returns an ok response', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = User::factory()->create();
+ $articles = Article::factory()->times(3)->create();
+ $user = User::factory()->create();
- $response = $this->actingAs($user)->get(route('articles.index'));
+ $response = $this->actingAs($user)->get(route('articles.index'));
- $response->assertOk();
- $response->assertViewIs('article.index');
- $response->assertViewHas('articles');
- }
+ $response->assertOk();
+ $response->assertViewIs('article.index');
+ $response->assertViewHas('articles', $articles);
- #[Test]
- public function show_returns_an_ok_response(): void
- {
- $this->seed(GroupsTableSeeder::class);
+ // TODO: perform additional assertions
+});
- $article = Article::factory()->create();
- $user = User::factory()->create();
+test('show returns an ok response', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $response = $this->actingAs($user)->get(route('articles.show', ['article' => $article]));
+ $article = Article::factory()->create();
+ $user = User::factory()->create();
- $response->assertOk();
- $response->assertViewIs('article.show');
- $response->assertViewHas('article');
- }
-}
+ $response = $this->actingAs($user)->get(route('articles.show', [$article]));
+
+ $response->assertOk();
+ $response->assertViewIs('article.show');
+ $response->assertViewHas('article', $article);
+
+ // TODO: perform additional assertions
+});
+
+// test cases...
diff --git a/tests/Feature/Http/Controllers/ArticleControllerTest.shift.php b/tests/Feature/Http/Controllers/ArticleControllerTest.shift.php
deleted file mode 100644
index 16cdca6c0..000000000
--- a/tests/Feature/Http/Controllers/ArticleControllerTest.shift.php
+++ /dev/null
@@ -1,35 +0,0 @@
-markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $articles = \App\Models\Article::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
-
- $response = $this->actingAs($user)->get(route('articles.index'));
-
- $response->assertOk();
- $response->assertViewIs('article.index');
- $response->assertViewHas('articles', $articles);
-
- // TODO: perform additional assertions
-});
-
-test('show returns an ok response', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $article = \App\Models\Article::factory()->create();
- $user = \App\Models\User::factory()->create();
-
- $response = $this->actingAs($user)->get(route('articles.show', [$article]));
-
- $response->assertOk();
- $response->assertViewIs('article.show');
- $response->assertViewHas('article', $article);
-
- // TODO: perform additional assertions
-});
-
-// test cases...
diff --git a/tests/Feature/Http/Controllers/Auth/ActivationControllerTest.php b/tests/Feature/Http/Controllers/Auth/ActivationControllerTest.php
index 0953fd6cf..d46a15ecc 100644
--- a/tests/Feature/Http/Controllers/Auth/ActivationControllerTest.php
+++ b/tests/Feature/Http/Controllers/Auth/ActivationControllerTest.php
@@ -1,26 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
*/
-final class ActivationControllerTest extends TestCase
-{
- #[Test]
- public function activate_returns_an_ok_response(): void
- {
- $this->seed(GroupsTableSeeder::class);
+test('activate returns an ok response', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $activation = UserActivation::factory()->create();
+ $response = $this->get(route('activate', ['token' => $token]));
- $this->get(route('activate', ['token' => $activation->token]))
- ->assertRedirect(route('login'))
- ->assertSessionHas('success', trans('auth.activation-success'));
- }
-}
+ $response->assertOk();
+
+ // TODO: perform additional assertions
+});
+
+// test cases...
diff --git a/tests/Feature/Http/Controllers/Auth/ActivationControllerTest.shift.php b/tests/Feature/Http/Controllers/Auth/ActivationControllerTest.shift.php
deleted file mode 100644
index af8ec089e..000000000
--- a/tests/Feature/Http/Controllers/Auth/ActivationControllerTest.shift.php
+++ /dev/null
@@ -1,13 +0,0 @@
-markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $response = $this->get(route('activate', ['token' => $token]));
-
- $response->assertOk();
-
- // TODO: perform additional assertions
-});
-
-// test cases...
diff --git a/tests/Feature/Http/Controllers/Auth/ApplicationControllerTest.php b/tests/Feature/Http/Controllers/Auth/ApplicationControllerTest.php
index a58a6e2f8..93e77d12c 100644
--- a/tests/Feature/Http/Controllers/Auth/ApplicationControllerTest.php
+++ b/tests/Feature/Http/Controllers/Auth/ApplicationControllerTest.php
@@ -1,37 +1,36 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
*/
-final class ApplicationControllerTest extends TestCase
-{
- #[Test]
- public function create_returns_an_ok_response(): void
- {
- $this->get(route('application.create'))
- ->assertOk()
- ->assertViewIs('auth.application.create');
- }
+test('create returns an ok response', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- #[Test]
- public function store_returns_an_ok_response(): void
- {
- config(['captcha.enabled' => false]);
+ $response = $this->get(route('application.create'));
- $application = Application::factory()->make();
+ $response->assertOk();
+ $response->assertViewIs('auth.application.create');
- $this->post(route('application.store'), [
- 'type' => $application->type,
- 'email' => $application->email,
- 'referrer' => $application->referrer,
- ])
- ->assertRedirect(route('login'))
- ->assertSessionHas('success', trans('auth.application-submitted'));
- }
-}
+ // TODO: perform additional assertions
+});
+
+test('store returns an ok response', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
+
+ $response = $this->post(route('application.store'), [
+ // TODO: send request data
+ ]);
+
+ $response->assertOk();
+
+ // TODO: perform additional assertions
+});
+
+// test cases...
diff --git a/tests/Feature/Http/Controllers/Auth/ApplicationControllerTest.shift.php b/tests/Feature/Http/Controllers/Auth/ApplicationControllerTest.shift.php
deleted file mode 100644
index 90bc46a24..000000000
--- a/tests/Feature/Http/Controllers/Auth/ApplicationControllerTest.shift.php
+++ /dev/null
@@ -1,26 +0,0 @@
-markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $response = $this->get(route('application.create'));
-
- $response->assertOk();
- $response->assertViewIs('auth.application.create');
-
- // TODO: perform additional assertions
-});
-
-test('store returns an ok response', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $response = $this->post(route('application.store'), [
- // TODO: send request data
- ]);
-
- $response->assertOk();
-
- // TODO: perform additional assertions
-});
-
-// test cases...
diff --git a/tests/Feature/Http/Controllers/Auth/ForgotUsernameControllerTest.php b/tests/Feature/Http/Controllers/Auth/ForgotUsernameControllerTest.php
index c1d04f3d8..fc7030c87 100644
--- a/tests/Feature/Http/Controllers/Auth/ForgotUsernameControllerTest.php
+++ b/tests/Feature/Http/Controllers/Auth/ForgotUsernameControllerTest.php
@@ -1,35 +1,41 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
*/
-final class ForgotUsernameControllerTest extends TestCase
-{
- #[Test]
- public function send_username_reminder_returns_an_ok_response(): void
- {
- config(['captcha.enabled' => false]);
- $user = User::factory()->create();
+use App\Models\User;
- $this->post(route('username.email'), [
- 'email' => $user->email,
- ])
- ->assertRedirect(route('login'))
- ->assertSessionHas('success', trans('email.username-sent'));
- }
+test('send username reminder returns an ok response', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- #[Test]
- public function show_forgot_username_form_returns_an_ok_response(): void
- {
- $this->get(route('username.request'))
- ->assertOk()
- ->assertViewIs('auth.username');
- }
-}
+ $user = User::factory()->create();
+
+ $response = $this->post(route('username.email'), [
+ // TODO: send request data
+ ]);
+
+ $response->assertOk();
+
+ // TODO: perform additional assertions
+});
+
+test('show forgot username form returns an ok response', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
+
+ $response = $this->get(route('username.request'));
+
+ $response->assertOk();
+ $response->assertViewIs('auth.username');
+
+ // TODO: perform additional assertions
+});
+
+// test cases...
diff --git a/tests/Feature/Http/Controllers/Auth/ForgotUsernameControllerTest.shift.php b/tests/Feature/Http/Controllers/Auth/ForgotUsernameControllerTest.shift.php
deleted file mode 100644
index 207c9ac1c..000000000
--- a/tests/Feature/Http/Controllers/Auth/ForgotUsernameControllerTest.shift.php
+++ /dev/null
@@ -1,30 +0,0 @@
-markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $user = \App\Models\User::factory()->create();
-
- $response = $this->post(route('username.email'), [
- // TODO: send request data
- ]);
-
- $response->assertOk();
-
- // TODO: perform additional assertions
-});
-
-test('show forgot username form returns an ok response', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $response = $this->get(route('username.request'));
-
- $response->assertOk();
- $response->assertViewIs('auth.username');
-
- // TODO: perform additional assertions
-});
-
-// test cases...
diff --git a/tests/Feature/Http/Controllers/Auth/TwoStepControllerTest.php b/tests/Feature/Http/Controllers/Auth/TwoStepControllerTest.php
index 12b09d66f..b8619a5f0 100644
--- a/tests/Feature/Http/Controllers/Auth/TwoStepControllerTest.php
+++ b/tests/Feature/Http/Controllers/Auth/TwoStepControllerTest.php
@@ -1,78 +1,97 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
*/
-final class TwoStepControllerTest extends TestCase
-{
- #[Test]
- public function resend_returns_an_ok_response(): void
- {
- config(['auth.TwoStepEnabled' => true]);
- $this->seed(GroupsTableSeeder::class);
+use App\Models\User;
- $user = User::factory()->create([
- 'twostep' => true,
- ]);
+test('resend returns an ok response', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- TwoStepAuth::factory()->create([
- 'userId' => $user->id,
- ]);
+ $user = User::factory()->create();
- $this->actingAs($user)->post(route('resend'))
- ->assertRedirect(route('verificationNeeded'));
- }
+ $response = $this->actingAs($user)->post(route('resend'), [
+ // TODO: send request data
+ ]);
- #[Test]
- public function show_verification_returns_an_ok_response(): void
- {
- config(['auth.TwoStepEnabled' => true]);
+ $response->assertOk();
- $this->seed(GroupsTableSeeder::class);
+ // TODO: perform additional assertions
+});
- $user = User::factory()->create([
- 'twostep' => true,
- ]);
+test('resend aborts with a 404', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- TwoStepAuth::factory()->create([
- 'userId' => $user->id,
- ]);
+ $user = User::factory()->create();
- $this->actingAs($user)->get(route('verificationNeeded'))
- ->assertOk()
- ->assertViewIs('auth.twostep-verification');
- }
+ // TODO: perform additional setup to trigger `abort_if(404)`...
- #[Test]
- public function verify_returns_an_ok_response(): void
- {
- config(['auth.TwoStepEnabled' => true]);
+ $response = $this->actingAs($user)->post(route('resend'), [
+ // TODO: send request data
+ ]);
- $this->seed(GroupsTableSeeder::class);
+ $response->assertNotFound();
+});
- $user = User::factory()->create([
- 'twostep' => true,
- ]);
+test('show verification returns an ok response', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $twoStep = TwoStepAuth::factory()->create([
- 'userId' => $user->id,
- ]);
+ $user = User::factory()->create();
- $this->actingAs($user)->postJson(route('verify'), [
- 'v_input_1' => $twoStep->authCode[0],
- 'v_input_2' => $twoStep->authCode[1],
- 'v_input_3' => $twoStep->authCode[2],
- 'v_input_4' => $twoStep->authCode[3],
- ], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])
- ->assertOk();
- }
-}
+ $response = $this->actingAs($user)->get(route('verificationNeeded'));
+
+ $response->assertOk();
+ $response->assertViewIs('auth.twostep-exceeded');
+
+ // TODO: perform additional assertions
+});
+
+test('show verification aborts with a 404', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
+
+ $user = User::factory()->create();
+
+ // TODO: perform additional setup to trigger `abort_if(404)`...
+
+ $response = $this->actingAs($user)->get(route('verificationNeeded'));
+
+ $response->assertNotFound();
+});
+
+test('verify returns an ok response', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
+
+ $user = User::factory()->create();
+
+ $response = $this->actingAs($user)->post(route('verify'), [
+ // TODO: send request data
+ ]);
+
+ $response->assertOk();
+
+ // TODO: perform additional assertions
+});
+
+test('verify aborts with a 404', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
+
+ $user = User::factory()->create();
+
+ // TODO: perform additional setup to trigger `abort_if(404)`...
+
+ $response = $this->actingAs($user)->post(route('verify'), [
+ // TODO: send request data
+ ]);
+
+ $response->assertNotFound();
+});
+
+// test cases...
diff --git a/tests/Feature/Http/Controllers/Auth/TwoStepControllerTest.shift.php b/tests/Feature/Http/Controllers/Auth/TwoStepControllerTest.shift.php
deleted file mode 100644
index 2f1589e4e..000000000
--- a/tests/Feature/Http/Controllers/Auth/TwoStepControllerTest.shift.php
+++ /dev/null
@@ -1,100 +0,0 @@
-markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $user = \App\Models\User::factory()->create();
-
- $response = $this->actingAs($user)->post(route('resend'), [
- // TODO: send request data
- ]);
-
- $response->assertOk();
-
- // TODO: perform additional assertions
-});
-
-test('resend aborts with a 404', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $user = \App\Models\User::factory()->create();
-
- // TODO: perform additional setup to trigger `abort_if(404)`...
-
- $response = $this->actingAs($user)->post(route('resend'), [
- // TODO: send request data
- ]);
-
- $response->assertNotFound();
-});
-
-test('show verification returns an ok response', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $user = \App\Models\User::factory()->create();
-
- $response = $this->actingAs($user)->get(route('verificationNeeded'));
-
- $response->assertOk();
- $response->assertViewIs('auth.twostep-exceeded');
-
- // TODO: perform additional assertions
-});
-
-test('show verification aborts with a 404', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $user = \App\Models\User::factory()->create();
-
- // TODO: perform additional setup to trigger `abort_if(404)`...
-
- $response = $this->actingAs($user)->get(route('verificationNeeded'));
-
- $response->assertNotFound();
-});
-
-test('verify returns an ok response', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $user = \App\Models\User::factory()->create();
-
- $response = $this->actingAs($user)->post(route('verify'), [
- // TODO: send request data
- ]);
-
- $response->assertOk();
-
- // TODO: perform additional assertions
-});
-
-test('verify aborts with a 404', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $user = \App\Models\User::factory()->create();
-
- // TODO: perform additional setup to trigger `abort_if(404)`...
-
- $response = $this->actingAs($user)->post(route('verify'), [
- // TODO: send request data
- ]);
-
- $response->assertNotFound();
-});
-
-test('verify aborts with a 404', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $user = \App\Models\User::factory()->create();
-
- // TODO: perform additional setup to trigger `abort(404)`...
-
- $response = $this->actingAs($user)->post(route('verify'), [
- // TODO: send request data
- ]);
-
- $response->assertNotFound();
-});
-
-// test cases...
diff --git a/tests/Feature/Http/Controllers/BountyControllerTest.php b/tests/Feature/Http/Controllers/BountyControllerTest.php
index 759e68915..f7a804d52 100644
--- a/tests/Feature/Http/Controllers/BountyControllerTest.php
+++ b/tests/Feature/Http/Controllers/BountyControllerTest.php
@@ -1,20 +1,34 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\BountyController;
+use App\Http\Requests\StoreTorrentRequestBountyRequest;
+use App\Models\TorrentRequest;
+use App\Models\User;
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\BountyController::class,
+ BountyController::class,
'store',
- \App\Http\Requests\StoreTorrentRequestBountyRequest::class
+ StoreTorrentRequestBountyRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequest = \App\Models\TorrentRequest::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequest = TorrentRequest::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('requests.bounties.store', [$torrentRequest]), [
// TODO: send request data
@@ -28,8 +42,8 @@ test('store returns an ok response', function (): void {
test('store aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequest = \App\Models\TorrentRequest::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequest = TorrentRequest::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/ClaimControllerTest.php b/tests/Feature/Http/Controllers/ClaimControllerTest.php
index 0bcac635a..ed11b3f55 100644
--- a/tests/Feature/Http/Controllers/ClaimControllerTest.php
+++ b/tests/Feature/Http/Controllers/ClaimControllerTest.php
@@ -1,13 +1,28 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\ClaimController;
+use App\Http\Requests\StoreTorrentRequestClaimRequest;
+use App\Models\TorrentRequest;
+use App\Models\TorrentRequestClaim;
+use App\Models\User;
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequest = \App\Models\TorrentRequest::factory()->create();
- $torrentRequestClaim = \App\Models\TorrentRequestClaim::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequest = TorrentRequest::factory()->create();
+ $torrentRequestClaim = TorrentRequestClaim::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('requests.claims.destroy', [$torrentRequest, 'claim' => $claim]));
@@ -20,9 +35,9 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequest = \App\Models\TorrentRequest::factory()->create();
- $torrentRequestClaim = \App\Models\TorrentRequestClaim::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequest = TorrentRequest::factory()->create();
+ $torrentRequestClaim = TorrentRequestClaim::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -33,17 +48,17 @@ test('destroy aborts with a 403', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\ClaimController::class,
+ ClaimController::class,
'store',
- \App\Http\Requests\StoreTorrentRequestClaimRequest::class
+ StoreTorrentRequestClaimRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequest = \App\Models\TorrentRequest::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequest = TorrentRequest::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('requests.claims.store', [$torrentRequest]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/ContactControllerTest.php b/tests/Feature/Http/Controllers/ContactControllerTest.php
index da3c37db1..e11c701d5 100644
--- a/tests/Feature/Http/Controllers/ContactControllerTest.php
+++ b/tests/Feature/Http/Controllers/ContactControllerTest.php
@@ -1,47 +1,44 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
*/
-final class ContactControllerTest extends TestCase
-{
- #[Test]
- public function index_returns_an_ok_response(): void
- {
- $this->seed(UsersTableSeeder::class);
- $this->seed(GroupsTableSeeder::class);
- $user = User::factory()->create();
+use App\Models\User;
- $response = $this->actingAs($user)->get(route('contact.index'));
+test('index returns an ok response', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $response->assertOk()
- ->assertViewIs('contact.index');
- }
+ $user = User::factory()->create();
- #[Test]
- public function store_returns_an_ok_response(): void
- {
- $this->seed(UsersTableSeeder::class);
- $this->seed(GroupsTableSeeder::class);
+ $response = $this->actingAs($user)->get(route('contact.index'));
- $user = User::factory()->create();
+ $response->assertOk();
+ $response->assertViewIs('contact.index');
- $response = $this->actingAs($user)->post(route('contact.store'), [
- 'email' => 'foo@bar.com',
- 'contact-name' => 'Foo Bar',
- 'message' => 'Hello, world!',
- ]);
+ // TODO: perform additional assertions
+});
- $response->assertRedirect(route('home.index'))
- ->assertSessionHas('success', 'Your Message Was Successfully Sent');
- }
-}
+test('store returns an ok response', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
+
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
+
+ $response = $this->actingAs($authUser)->post(route('contact.store'), [
+ // TODO: send request data
+ ]);
+
+ $response->assertOk();
+
+ // TODO: perform additional assertions
+});
+
+// test cases...
diff --git a/tests/Feature/Http/Controllers/ContactControllerTest.shift.php b/tests/Feature/Http/Controllers/ContactControllerTest.shift.php
deleted file mode 100644
index 1dd1559fe..000000000
--- a/tests/Feature/Http/Controllers/ContactControllerTest.shift.php
+++ /dev/null
@@ -1,33 +0,0 @@
-markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $user = \App\Models\User::factory()->create();
-
- $response = $this->actingAs($user)->get(route('contact.index'));
-
- $response->assertOk();
- $response->assertViewIs('contact.index');
-
- // TODO: perform additional assertions
-});
-
-test('store returns an ok response', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
-
- $response = $this->actingAs($authUser)->post(route('contact.store'), [
- // TODO: send request data
- ]);
-
- $response->assertOk();
-
- // TODO: perform additional assertions
-});
-
-// test cases...
diff --git a/tests/Feature/Http/Controllers/ForumCategoryControllerTest.php b/tests/Feature/Http/Controllers/ForumCategoryControllerTest.php
index 25c995288..c08e62929 100644
--- a/tests/Feature/Http/Controllers/ForumCategoryControllerTest.php
+++ b/tests/Feature/Http/Controllers/ForumCategoryControllerTest.php
@@ -1,12 +1,24 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Forum;
+use App\Models\User;
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $forum = \App\Models\Forum::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $forum = Forum::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('forums.categories.show', ['id' => $id]));
diff --git a/tests/Feature/Http/Controllers/ForumControllerTest.php b/tests/Feature/Http/Controllers/ForumControllerTest.php
index 81b2ad25a..e7050d856 100644
--- a/tests/Feature/Http/Controllers/ForumControllerTest.php
+++ b/tests/Feature/Http/Controllers/ForumControllerTest.php
@@ -1,105 +1,50 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
*/
-final class ForumControllerTest extends TestCase
-{
- #[Test]
- public function index_returns_an_ok_response(): void
- {
- $this->seed(UsersTableSeeder::class);
- $this->seed(GroupsTableSeeder::class);
- $user = User::factory()->create();
+use App\Models\Forum;
+use App\Models\User;
- $this->actingAs($user)->get(route('forums.index'))
- ->assertOk()
- ->assertViewIs('forum.index')
- ->assertViewHas('categories')
- ->assertViewHas('num_posts')
- ->assertViewHas('num_forums')
- ->assertViewHas('num_topics');
- }
+test('index returns an ok response', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- #[Test]
- public function latest_posts_returns_an_ok_response(): void
- {
- $this->seed(UsersTableSeeder::class);
- $this->seed(GroupsTableSeeder::class);
+ $forums = Forum::factory()->times(3)->create();
+ $user = User::factory()->create();
- $user = User::factory()->create();
+ $response = $this->actingAs($user)->get(route('forums.index'));
- $this->actingAs($user)->get(route('posts.index'))
- ->assertOk()
- ->assertViewIs('forum.post.index')
- ->assertSeeLivewire(PostSearch::class);
- }
+ $response->assertOk();
+ $response->assertViewIs('forum.index');
+ $response->assertViewHas('categories');
+ $response->assertViewHas('num_posts');
+ $response->assertViewHas('num_forums');
+ $response->assertViewHas('num_topics');
- #[Test]
- public function latest_topics_returns_an_ok_response(): void
- {
- $this->seed(UsersTableSeeder::class);
- $this->seed(GroupsTableSeeder::class);
+ // TODO: perform additional assertions
+});
- $user = User::factory()->create();
+test('show returns an ok response', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $this->actingAs($user)->get(route('topics.index'))
- ->assertOk()
- ->assertViewIs('forum.topic.index')
- ->assertSeeLivewire(TopicSearch::class);
- }
+ $forum = Forum::factory()->create();
+ $user = User::factory()->create();
- #[Test]
- public function show_forum_returns_an_ok_response(): void
- {
- $this->seed(UsersTableSeeder::class);
- $this->seed(GroupsTableSeeder::class);
+ $response = $this->actingAs($user)->get(route('forums.show', ['id' => $forum->id]));
- $user = User::factory()->create();
+ $response->assertOk();
+ $response->assertViewIs('forum.forum_topic.index');
+ $response->assertViewHas('forum', $forum);
- // This Forum does not have a parent, which makes it a proper Forum
- // (and not a "Forum Category").
+ // TODO: perform additional assertions
+});
- $forum = Forum::factory()->create([
- 'parent_id' => 0,
- 'last_post_user_id' => $user->id,
- 'last_post_user_username' => $user->username,
- ]);
-
- $permissions = Permission::factory()->create([
- 'forum_id' => $forum->id,
- 'show_forum' => true,
- ]);
-
- $this->actingAs($user)->get(route('forums.show', ['id' => $forum->id]))
- ->assertRedirect(route('forums.categories.show', ['id' => $forum->id]));
- }
-
- #[Test]
- public function subscriptions_returns_an_ok_response(): void
- {
- $this->seed(UsersTableSeeder::class);
- $this->seed(GroupsTableSeeder::class);
-
- $user = User::factory()->create();
-
- $this->actingAs($user)->get(route('subscriptions.index'))
- ->assertOk()
- ->assertViewIs('forum.subscriptions')
- ->assertSeeLivewire(SubscribedForum::class);
- }
-}
+// test cases...
diff --git a/tests/Feature/Http/Controllers/ForumControllerTest.shift.php b/tests/Feature/Http/Controllers/ForumControllerTest.shift.php
deleted file mode 100644
index 47374dbbd..000000000
--- a/tests/Feature/Http/Controllers/ForumControllerTest.shift.php
+++ /dev/null
@@ -1,38 +0,0 @@
-markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $forums = \App\Models\Forum::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
-
- $response = $this->actingAs($user)->get(route('forums.index'));
-
- $response->assertOk();
- $response->assertViewIs('forum.index');
- $response->assertViewHas('categories');
- $response->assertViewHas('num_posts');
- $response->assertViewHas('num_forums');
- $response->assertViewHas('num_topics');
-
- // TODO: perform additional assertions
-});
-
-test('show returns an ok response', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $forum = \App\Models\Forum::factory()->create();
- $user = \App\Models\User::factory()->create();
-
- $response = $this->actingAs($user)->get(route('forums.show', ['id' => $forum->id]));
-
- $response->assertOk();
- $response->assertViewIs('forum.forum_topic.index');
- $response->assertViewHas('forum', $forum);
-
- // TODO: perform additional assertions
-});
-
-// test cases...
diff --git a/tests/Feature/Http/Controllers/HomeControllerTest.php b/tests/Feature/Http/Controllers/HomeControllerTest.php
index 30f2e8c22..9f21ac607 100644
--- a/tests/Feature/Http/Controllers/HomeControllerTest.php
+++ b/tests/Feature/Http/Controllers/HomeControllerTest.php
@@ -1,70 +1,70 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
*/
-final class HomeControllerTest extends TestCase
-{
- protected function setUp(): void
- {
- parent::setUp();
- $this->seed(GroupsTableSeeder::class);
- }
+use App\Models\Article;
+use App\Models\Bookmark;
+use App\Models\FeaturedTorrent;
+use App\Models\FreeleechToken;
+use App\Models\Group;
+use App\Models\Movie;
+use App\Models\Poll;
+use App\Models\Post;
+use App\Models\Topic;
+use App\Models\Torrent;
+use App\Models\Tv;
+use App\Models\User;
- #[Test]
- public function whenNotAuthenticatedHomepageRedirectsToLogin(): void
- {
- $response = $this->get('/');
+test('index returns an ok response', function (): void {
+ $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $response->assertRedirect(route('login'));
- }
+ $poll = Poll::factory()->create();
+ $articles = Article::factory()->times(3)->create();
+ $users = User::factory()->times(3)->create();
+ $groups = Group::factory()->times(3)->create();
+ $torrents = Torrent::factory()->times(3)->create();
+ $movies = Movie::factory()->times(3)->create();
+ $tvs = Tv::factory()->times(3)->create();
+ $topics = Topic::factory()->times(3)->create();
+ $posts = Post::factory()->times(3)->create();
+ $featuredTorrents = FeaturedTorrent::factory()->times(3)->create();
+ $freeleechTokens = FreeleechToken::factory()->times(3)->create();
+ $bookmarks = Bookmark::factory()->times(3)->create();
+ $user = User::factory()->create();
- #[Test]
- public function whenAuthenticatedHomepageReturns200(): void
- {
- $user = User::factory()->create();
+ $response = $this->actingAs($user)->get(route('home.index'));
- $this->actingAs($user)
- ->get(route('home.index'))
- ->assertOk()
- ->assertViewIs('home.index')
- ->assertViewHas('user')
- ->assertViewHas('personal_freeleech')
- ->assertViewHas('users')
- ->assertViewHas('groups')
- ->assertViewHas('articles')
- ->assertViewHas('newest')
- ->assertViewHas('seeded')
- ->assertViewHas('dying')
- ->assertViewHas('leeched')
- ->assertViewHas('dead')
- ->assertViewHas('topics')
- ->assertViewHas('posts')
- ->assertViewHas('featured')
- ->assertViewHas('poll')
- ->assertViewHas('uploaders')
- ->assertViewHas('past_uploaders')
- ->assertViewHas('freeleech_tokens')
- ->assertViewHas('bookmarks');
- }
+ $response->assertOk();
+ $response->assertViewIs('home.index');
+ $response->assertViewHas('user', $user);
+ $response->assertViewHas('personal_freeleech');
+ $response->assertViewHas('users', $users);
+ $response->assertViewHas('groups', $groups);
+ $response->assertViewHas('articles', $articles);
+ $response->assertViewHas('newest');
+ $response->assertViewHas('seeded');
+ $response->assertViewHas('dying');
+ $response->assertViewHas('leeched');
+ $response->assertViewHas('dead');
+ $response->assertViewHas('topics', $topics);
+ $response->assertViewHas('posts', $posts);
+ $response->assertViewHas('featured');
+ $response->assertViewHas('poll', $poll);
+ $response->assertViewHas('uploaders');
+ $response->assertViewHas('past_uploaders');
+ $response->assertViewHas('freeleech_tokens');
+ $response->assertViewHas('bookmarks', $bookmarks);
- #[Test]
- public function whenAuthenticatedAndTwoStepRequiredHomepageRedirectsToTwoStep(): void
- {
- $user = User::factory()->create([
- 'twostep' => true,
- ]);
+ // TODO: perform additional assertions
+});
- $this->actingAs($user)
- ->get(route('home.index'))
- ->assertRedirect(route('verificationNeeded'));
- }
-}
+// test cases...
diff --git a/tests/Feature/Http/Controllers/HomeControllerTest.shift.php b/tests/Feature/Http/Controllers/HomeControllerTest.shift.php
deleted file mode 100644
index f328a1a24..000000000
--- a/tests/Feature/Http/Controllers/HomeControllerTest.shift.php
+++ /dev/null
@@ -1,48 +0,0 @@
-markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $poll = \App\Models\Poll::factory()->create();
- $articles = \App\Models\Article::factory()->times(3)->create();
- $users = \App\Models\User::factory()->times(3)->create();
- $groups = \App\Models\Group::factory()->times(3)->create();
- $torrents = \App\Models\Torrent::factory()->times(3)->create();
- $movies = \App\Models\Movie::factory()->times(3)->create();
- $tvs = \App\Models\Tv::factory()->times(3)->create();
- $topics = \App\Models\Topic::factory()->times(3)->create();
- $posts = \App\Models\Post::factory()->times(3)->create();
- $featuredTorrents = \App\Models\FeaturedTorrent::factory()->times(3)->create();
- $freeleechTokens = \App\Models\FreeleechToken::factory()->times(3)->create();
- $bookmarks = \App\Models\Bookmark::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
-
- $response = $this->actingAs($user)->get(route('home.index'));
-
- $response->assertOk();
- $response->assertViewIs('home.index');
- $response->assertViewHas('user', $user);
- $response->assertViewHas('personal_freeleech');
- $response->assertViewHas('users', $users);
- $response->assertViewHas('groups', $groups);
- $response->assertViewHas('articles', $articles);
- $response->assertViewHas('newest');
- $response->assertViewHas('seeded');
- $response->assertViewHas('dying');
- $response->assertViewHas('leeched');
- $response->assertViewHas('dead');
- $response->assertViewHas('topics', $topics);
- $response->assertViewHas('posts', $posts);
- $response->assertViewHas('featured');
- $response->assertViewHas('poll', $poll);
- $response->assertViewHas('uploaders');
- $response->assertViewHas('past_uploaders');
- $response->assertViewHas('freeleech_tokens');
- $response->assertViewHas('bookmarks', $bookmarks);
-
- // TODO: perform additional assertions
-});
-
-// test cases...
diff --git a/tests/Feature/Http/Controllers/MediaHub/CollectionControllerTest.php b/tests/Feature/Http/Controllers/MediaHub/CollectionControllerTest.php
index 7d0f931ef..b422ab3fb 100644
--- a/tests/Feature/Http/Controllers/MediaHub/CollectionControllerTest.php
+++ b/tests/Feature/Http/Controllers/MediaHub/CollectionControllerTest.php
@@ -1,11 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Collection;
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('mediahub.collections.index'));
@@ -18,8 +30,8 @@ test('index returns an ok response', function (): void {
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $collection = \App\Models\Collection::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $collection = Collection::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('mediahub.collections.show', ['id' => $collection->id]));
diff --git a/tests/Feature/Http/Controllers/MediaHub/CompanyControllerTest.php b/tests/Feature/Http/Controllers/MediaHub/CompanyControllerTest.php
index 3ef68b541..847abac82 100644
--- a/tests/Feature/Http/Controllers/MediaHub/CompanyControllerTest.php
+++ b/tests/Feature/Http/Controllers/MediaHub/CompanyControllerTest.php
@@ -1,11 +1,22 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('mediahub.companies.index'));
diff --git a/tests/Feature/Http/Controllers/MediaHub/GenreControllerTest.php b/tests/Feature/Http/Controllers/MediaHub/GenreControllerTest.php
index 03d413bb3..3d2297691 100644
--- a/tests/Feature/Http/Controllers/MediaHub/GenreControllerTest.php
+++ b/tests/Feature/Http/Controllers/MediaHub/GenreControllerTest.php
@@ -1,12 +1,24 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Genre;
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $genres = \App\Models\Genre::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $genres = Genre::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('mediahub.genres.index'));
diff --git a/tests/Feature/Http/Controllers/MediaHub/HomeControllerTest.php b/tests/Feature/Http/Controllers/MediaHub/HomeControllerTest.php
index f8935b518..76f60823c 100644
--- a/tests/Feature/Http/Controllers/MediaHub/HomeControllerTest.php
+++ b/tests/Feature/Http/Controllers/MediaHub/HomeControllerTest.php
@@ -1,11 +1,22 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('mediahub.index'));
diff --git a/tests/Feature/Http/Controllers/MediaHub/NetworkControllerTest.php b/tests/Feature/Http/Controllers/MediaHub/NetworkControllerTest.php
index 4ecd167ea..bd6989768 100644
--- a/tests/Feature/Http/Controllers/MediaHub/NetworkControllerTest.php
+++ b/tests/Feature/Http/Controllers/MediaHub/NetworkControllerTest.php
@@ -1,11 +1,22 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('mediahub.networks.index'));
diff --git a/tests/Feature/Http/Controllers/MediaHub/PersonControllerTest.php b/tests/Feature/Http/Controllers/MediaHub/PersonControllerTest.php
index 03d9d7c42..02b61d4c7 100644
--- a/tests/Feature/Http/Controllers/MediaHub/PersonControllerTest.php
+++ b/tests/Feature/Http/Controllers/MediaHub/PersonControllerTest.php
@@ -1,11 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Person;
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('mediahub.persons.index'));
@@ -18,8 +30,8 @@ test('index returns an ok response', function (): void {
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $person = \App\Models\Person::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $person = Person::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('mediahub.persons.show', ['id' => $person->id]));
diff --git a/tests/Feature/Http/Controllers/MediaHub/TvSeasonControllerTest.php b/tests/Feature/Http/Controllers/MediaHub/TvSeasonControllerTest.php
index e36f575a6..a05544b9b 100644
--- a/tests/Feature/Http/Controllers/MediaHub/TvSeasonControllerTest.php
+++ b/tests/Feature/Http/Controllers/MediaHub/TvSeasonControllerTest.php
@@ -1,13 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Season;
+use App\Models\Tv;
+use App\Models\User;
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $season = \App\Models\Season::factory()->create();
- $tv = \App\Models\Tv::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $season = Season::factory()->create();
+ $tv = Tv::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('mediahub.season.show', ['id' => $id]));
diff --git a/tests/Feature/Http/Controllers/MediaHub/TvShowControllerTest.php b/tests/Feature/Http/Controllers/MediaHub/TvShowControllerTest.php
index bfcc388ef..ff5d041a9 100644
--- a/tests/Feature/Http/Controllers/MediaHub/TvShowControllerTest.php
+++ b/tests/Feature/Http/Controllers/MediaHub/TvShowControllerTest.php
@@ -1,11 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Tv;
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('mediahub.shows.index'));
@@ -18,8 +30,8 @@ test('index returns an ok response', function (): void {
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $tv = \App\Models\Tv::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $tv = Tv::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('mediahub.shows.show', ['id' => $id]));
diff --git a/tests/Feature/Http/Controllers/MissingControllerTest.php b/tests/Feature/Http/Controllers/MissingControllerTest.php
index 8ffaf5ff6..6b67704eb 100644
--- a/tests/Feature/Http/Controllers/MissingControllerTest.php
+++ b/tests/Feature/Http/Controllers/MissingControllerTest.php
@@ -1,11 +1,22 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('missing.index'));
diff --git a/tests/Feature/Http/Controllers/PageControllerTest.php b/tests/Feature/Http/Controllers/PageControllerTest.php
index 6e281499b..e2975a8a7 100644
--- a/tests/Feature/Http/Controllers/PageControllerTest.php
+++ b/tests/Feature/Http/Controllers/PageControllerTest.php
@@ -1,11 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\BlacklistClient;
+use App\Models\Group;
+use App\Models\Internal;
+use App\Models\Page;
+use App\Models\User;
test('about returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('about'));
@@ -18,8 +33,8 @@ test('about returns an ok response', function (): void {
test('clientblacklist returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $blacklistClients = \App\Models\BlacklistClient::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $blacklistClients = BlacklistClient::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('client_blacklist'));
@@ -33,8 +48,8 @@ test('clientblacklist returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $pages = \App\Models\Page::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $pages = Page::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('pages.index'));
@@ -48,8 +63,8 @@ test('index returns an ok response', function (): void {
test('internal returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $internals = \App\Models\Internal::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $internals = Internal::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('internal'));
@@ -63,8 +78,8 @@ test('internal returns an ok response', function (): void {
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $page = \App\Models\Page::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $page = Page::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('pages.show', [$page]));
@@ -78,8 +93,8 @@ test('show returns an ok response', function (): void {
test('staff returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $groups = \App\Models\Group::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $groups = Group::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff'));
diff --git a/tests/Feature/Http/Controllers/PlaylistControllerTest.php b/tests/Feature/Http/Controllers/PlaylistControllerTest.php
index 9c7ba36ab..c72bde7b1 100644
--- a/tests/Feature/Http/Controllers/PlaylistControllerTest.php
+++ b/tests/Feature/Http/Controllers/PlaylistControllerTest.php
@@ -1,11 +1,28 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\PlaylistController;
+use App\Http\Requests\StorePlaylistRequest;
+use App\Http\Requests\UpdatePlaylistRequest;
+use App\Models\Movie;
+use App\Models\Playlist;
+use App\Models\Tv;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('playlists.create'));
@@ -18,8 +35,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $playlist = \App\Models\Playlist::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $playlist = Playlist::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('playlists.destroy', [$playlist]));
@@ -32,8 +49,8 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $playlist = \App\Models\Playlist::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $playlist = Playlist::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -45,8 +62,8 @@ test('destroy aborts with a 403', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $playlist = \App\Models\Playlist::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $playlist = Playlist::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('playlists.edit', [$playlist]));
@@ -60,8 +77,8 @@ test('edit returns an ok response', function (): void {
test('edit aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $playlist = \App\Models\Playlist::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $playlist = Playlist::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -73,8 +90,8 @@ test('edit aborts with a 403', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $playlists = \App\Models\Playlist::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $playlists = Playlist::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('playlists.index'));
@@ -88,10 +105,10 @@ test('index returns an ok response', function (): void {
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $playlist = \App\Models\Playlist::factory()->create();
- $tv = \App\Models\Tv::factory()->create();
- $movie = \App\Models\Movie::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $playlist = Playlist::factory()->create();
+ $tv = Tv::factory()->create();
+ $movie = Movie::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('playlists.show', [$playlist]));
@@ -107,10 +124,10 @@ test('show returns an ok response', function (): void {
test('show aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $playlist = \App\Models\Playlist::factory()->create();
- $tv = \App\Models\Tv::factory()->create();
- $movie = \App\Models\Movie::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $playlist = Playlist::factory()->create();
+ $tv = Tv::factory()->create();
+ $movie = Movie::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_if(403)`...
@@ -121,16 +138,16 @@ test('show aborts with a 403', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\PlaylistController::class,
+ PlaylistController::class,
'store',
- \App\Http\Requests\StorePlaylistRequest::class
+ StorePlaylistRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('playlists.store'), [
// TODO: send request data
@@ -143,17 +160,17 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\PlaylistController::class,
+ PlaylistController::class,
'update',
- \App\Http\Requests\UpdatePlaylistRequest::class
+ UpdatePlaylistRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $playlist = \App\Models\Playlist::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $playlist = Playlist::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('playlists.update', [$playlist]), [
// TODO: send request data
@@ -167,8 +184,8 @@ test('update returns an ok response', function (): void {
test('update aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $playlist = \App\Models\Playlist::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $playlist = Playlist::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/PlaylistTorrentControllerTest.php b/tests/Feature/Http/Controllers/PlaylistTorrentControllerTest.php
index 67f54b0f8..bd630f83a 100644
--- a/tests/Feature/Http/Controllers/PlaylistTorrentControllerTest.php
+++ b/tests/Feature/Http/Controllers/PlaylistTorrentControllerTest.php
@@ -1,12 +1,28 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\PlaylistTorrentController;
+use App\Http\Requests\MassUpsertPlaylistTorrentRequest;
+use App\Http\Requests\StorePlaylistTorrentRequest;
+use App\Models\Playlist;
+use App\Models\PlaylistTorrent;
+use App\Models\User;
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $playlistTorrent = \App\Models\PlaylistTorrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $playlistTorrent = PlaylistTorrent::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('playlist_torrents.destroy', [$playlistTorrent]));
@@ -19,8 +35,8 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $playlistTorrent = \App\Models\PlaylistTorrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $playlistTorrent = PlaylistTorrent::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -31,17 +47,17 @@ test('destroy aborts with a 403', function (): void {
test('massupsert validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\PlaylistTorrentController::class,
+ PlaylistTorrentController::class,
'massUpsert',
- \App\Http\Requests\MassUpsertPlaylistTorrentRequest::class
+ MassUpsertPlaylistTorrentRequest::class
);
});
test('mass upsert returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $playlist = \App\Models\Playlist::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $playlist = Playlist::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->put(route('playlist_torrents.massUpsert'), [
// TODO: send request data
@@ -55,8 +71,8 @@ test('mass upsert returns an ok response', function (): void {
test('mass upsert aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $playlist = \App\Models\Playlist::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $playlist = Playlist::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -69,17 +85,17 @@ test('mass upsert aborts with a 403', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\PlaylistTorrentController::class,
+ PlaylistTorrentController::class,
'store',
- \App\Http\Requests\StorePlaylistTorrentRequest::class
+ StorePlaylistTorrentRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $playlist = \App\Models\Playlist::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $playlist = Playlist::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('playlist_torrents.store'), [
// TODO: send request data
@@ -93,8 +109,8 @@ test('store returns an ok response', function (): void {
test('store aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $playlist = \App\Models\Playlist::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $playlist = Playlist::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/PlaylistZipControllerTest.php b/tests/Feature/Http/Controllers/PlaylistZipControllerTest.php
index 1700b04bc..de6177af5 100644
--- a/tests/Feature/Http/Controllers/PlaylistZipControllerTest.php
+++ b/tests/Feature/Http/Controllers/PlaylistZipControllerTest.php
@@ -1,12 +1,24 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Playlist;
+use App\Models\User;
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $playlist = \App\Models\Playlist::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $playlist = Playlist::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('playlist_zips.show', [$playlist]));
diff --git a/tests/Feature/Http/Controllers/PollControllerTest.php b/tests/Feature/Http/Controllers/PollControllerTest.php
index 6b1fe0894..9cfd13929 100644
--- a/tests/Feature/Http/Controllers/PollControllerTest.php
+++ b/tests/Feature/Http/Controllers/PollControllerTest.php
@@ -1,12 +1,24 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Poll;
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $polls = \App\Models\Poll::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $polls = Poll::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('polls.index'));
@@ -20,8 +32,8 @@ test('index returns an ok response', function (): void {
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $poll = \App\Models\Poll::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $poll = Poll::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('polls.show', [$poll]));
diff --git a/tests/Feature/Http/Controllers/PollVoteControllerTest.php b/tests/Feature/Http/Controllers/PollVoteControllerTest.php
index 24f16dab7..5fd396bb0 100644
--- a/tests/Feature/Http/Controllers/PollVoteControllerTest.php
+++ b/tests/Feature/Http/Controllers/PollVoteControllerTest.php
@@ -1,12 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\PollVoteController;
+use App\Http\Requests\StorePollVoteRequest;
+use App\Models\Poll;
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $poll = \App\Models\Poll::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $poll = Poll::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('polls.votes.index', [$poll]));
@@ -20,17 +34,17 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\PollVoteController::class,
+ PollVoteController::class,
'store',
- \App\Http\Requests\StorePollVoteRequest::class
+ StorePollVoteRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $poll = \App\Models\Poll::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $poll = Poll::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('polls.votes.store', [$poll]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/PostControllerTest.php b/tests/Feature/Http/Controllers/PostControllerTest.php
index 6e8f29506..0b61da845 100644
--- a/tests/Feature/Http/Controllers/PostControllerTest.php
+++ b/tests/Feature/Http/Controllers/PostControllerTest.php
@@ -1,12 +1,25 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Post;
+use App\Models\Topic;
+use App\Models\User;
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $post = \App\Models\Post::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $post = Post::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('posts.destroy', ['id' => $post->id]));
@@ -19,8 +32,8 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $post = \App\Models\Post::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $post = Post::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -32,8 +45,8 @@ test('destroy aborts with a 403', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $post = \App\Models\Post::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $post = Post::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('posts.edit', ['id' => $post->id]));
@@ -50,8 +63,8 @@ test('edit returns an ok response', function (): void {
test('edit aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $post = \App\Models\Post::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $post = Post::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -63,7 +76,7 @@ test('edit aborts with a 403', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('posts.index'));
@@ -76,9 +89,9 @@ test('index returns an ok response', function (): void {
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $topic = \App\Models\Topic::factory()->create();
- $users = \App\Models\User::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $topic = Topic::factory()->create();
+ $users = User::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('posts.store'), [
// TODO: send request data
@@ -92,8 +105,8 @@ test('store returns an ok response', function (): void {
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $post = \App\Models\Post::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $post = Post::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('posts.update', ['id' => $post->id]), [
// TODO: send request data
@@ -104,34 +117,4 @@ test('update returns an ok response', function (): void {
// TODO: perform additional assertions
});
-test('update aborts with a 403', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $post = \App\Models\Post::factory()->create();
- $user = \App\Models\User::factory()->create();
-
- // TODO: perform additional setup to trigger `abort_unless(403)`...
-
- $response = $this->actingAs($user)->patch(route('posts.update', ['id' => $post->id]), [
- // TODO: send request data
- ]);
-
- $response->assertForbidden();
-});
-
-test('update aborts with a 403', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $post = \App\Models\Post::factory()->create();
- $user = \App\Models\User::factory()->create();
-
- // TODO: perform additional setup to trigger `abort_unless(403)`...
-
- $response = $this->actingAs($user)->patch(route('posts.update', ['id' => $post->id]), [
- // TODO: send request data
- ]);
-
- $response->assertForbidden();
-});
-
// test cases...
diff --git a/tests/Feature/Http/Controllers/ReportControllerTest.php b/tests/Feature/Http/Controllers/ReportControllerTest.php
index 15b95f0c8..bd8e4d3fb 100644
--- a/tests/Feature/Http/Controllers/ReportControllerTest.php
+++ b/tests/Feature/Http/Controllers/ReportControllerTest.php
@@ -1,13 +1,27 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Report;
+use App\Models\Torrent;
+use App\Models\TorrentRequest;
+use App\Models\User;
test('request returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequest = \App\Models\TorrentRequest::factory()->create();
- $report = \App\Models\Report::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequest = TorrentRequest::factory()->create();
+ $report = Report::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('report_request', ['id' => $report->id]), [
// TODO: send request data
@@ -21,9 +35,9 @@ test('request returns an ok response', function (): void {
test('torrent returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $report = \App\Models\Report::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $report = Report::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('report_torrent', ['id' => $report->id]), [
// TODO: send request data
@@ -37,8 +51,8 @@ test('torrent returns an ok response', function (): void {
test('user returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $report = \App\Models\Report::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $report = Report::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('report_user', ['username' => $report->username]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/RequestControllerTest.php b/tests/Feature/Http/Controllers/RequestControllerTest.php
index d93024b9a..7cd496c7c 100644
--- a/tests/Feature/Http/Controllers/RequestControllerTest.php
+++ b/tests/Feature/Http/Controllers/RequestControllerTest.php
@@ -1,15 +1,35 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\RequestController;
+use App\Http\Requests\StoreTorrentRequestRequest;
+use App\Http\Requests\UpdateTorrentRequestRequest;
+use App\Models\Category;
+use App\Models\Movie;
+use App\Models\Resolution;
+use App\Models\TorrentRequest;
+use App\Models\Tv;
+use App\Models\Type;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $category = \App\Models\Category::factory()->create();
- $categories = \App\Models\Category::factory()->times(3)->create();
- $types = \App\Models\Type::factory()->times(3)->create();
- $resolutions = \App\Models\Resolution::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $category = Category::factory()->create();
+ $categories = Category::factory()->times(3)->create();
+ $types = Type::factory()->times(3)->create();
+ $resolutions = Resolution::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('requests.create'));
@@ -33,8 +53,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequest = \App\Models\TorrentRequest::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequest = TorrentRequest::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('requests.destroy', [$torrentRequest]));
@@ -47,8 +67,8 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequest = \App\Models\TorrentRequest::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequest = TorrentRequest::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -60,11 +80,11 @@ test('destroy aborts with a 403', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequest = \App\Models\TorrentRequest::factory()->create();
- $categories = \App\Models\Category::factory()->times(3)->create();
- $types = \App\Models\Type::factory()->times(3)->create();
- $resolutions = \App\Models\Resolution::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequest = TorrentRequest::factory()->create();
+ $categories = Category::factory()->times(3)->create();
+ $types = Type::factory()->times(3)->create();
+ $resolutions = Resolution::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('requests.edit', [$torrentRequest]));
@@ -82,7 +102,7 @@ test('edit returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('requests.index'));
@@ -95,10 +115,10 @@ test('index returns an ok response', function (): void {
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequest = \App\Models\TorrentRequest::factory()->create();
- $tv = \App\Models\Tv::factory()->create();
- $movie = \App\Models\Movie::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequest = TorrentRequest::factory()->create();
+ $tv = Tv::factory()->create();
+ $movie = Movie::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('requests.show', [$torrentRequest]));
@@ -113,16 +133,16 @@ test('show returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\RequestController::class,
+ RequestController::class,
'store',
- \App\Http\Requests\StoreTorrentRequestRequest::class
+ StoreTorrentRequestRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('requests.store'), [
// TODO: send request data
@@ -135,17 +155,17 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\RequestController::class,
+ RequestController::class,
'update',
- \App\Http\Requests\UpdateTorrentRequestRequest::class
+ UpdateTorrentRequestRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequest = \App\Models\TorrentRequest::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequest = TorrentRequest::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('requests.update', [$torrentRequest]), [
// TODO: send request data
@@ -159,8 +179,8 @@ test('update returns an ok response', function (): void {
test('update aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequest = \App\Models\TorrentRequest::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequest = TorrentRequest::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/RequestFillControllerTest.php b/tests/Feature/Http/Controllers/RequestFillControllerTest.php
index 8cbf512e9..0addbb46d 100644
--- a/tests/Feature/Http/Controllers/RequestFillControllerTest.php
+++ b/tests/Feature/Http/Controllers/RequestFillControllerTest.php
@@ -1,12 +1,27 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\RequestFillController;
+use App\Http\Requests\StoreRequestFillRequest;
+use App\Models\Torrent;
+use App\Models\TorrentRequest;
+use App\Models\User;
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequest = \App\Models\TorrentRequest::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequest = TorrentRequest::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('requests.fills.destroy', [$torrentRequest]));
@@ -19,8 +34,8 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequest = \App\Models\TorrentRequest::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequest = TorrentRequest::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -31,18 +46,18 @@ test('destroy aborts with a 403', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\RequestFillController::class,
+ RequestFillController::class,
'store',
- \App\Http\Requests\StoreRequestFillRequest::class
+ StoreRequestFillRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequest = \App\Models\TorrentRequest::factory()->create();
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequest = TorrentRequest::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('requests.fills.store', [$torrentRequest]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/ReseedControllerTest.php b/tests/Feature/Http/Controllers/ReseedControllerTest.php
index be1a87a59..893fba814 100644
--- a/tests/Feature/Http/Controllers/ReseedControllerTest.php
+++ b/tests/Feature/Http/Controllers/ReseedControllerTest.php
@@ -1,14 +1,27 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\History;
+use App\Models\Torrent;
+use App\Models\User;
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
- $histories = \App\Models\History::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
+ $histories = History::factory()->times(3)->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post(route('reseed', ['id' => $id]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/RssControllerTest.php b/tests/Feature/Http/Controllers/RssControllerTest.php
index 44cd1fe31..462e76a39 100644
--- a/tests/Feature/Http/Controllers/RssControllerTest.php
+++ b/tests/Feature/Http/Controllers/RssControllerTest.php
@@ -1,15 +1,32 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Category;
+use App\Models\Genre;
+use App\Models\Resolution;
+use App\Models\Rss;
+use App\Models\Torrent;
+use App\Models\Type;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $categories = \App\Models\Category::factory()->times(3)->create();
- $types = \App\Models\Type::factory()->times(3)->create();
- $resolutions = \App\Models\Resolution::factory()->times(3)->create();
- $genres = \App\Models\Genre::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $categories = Category::factory()->times(3)->create();
+ $types = Type::factory()->times(3)->create();
+ $resolutions = Resolution::factory()->times(3)->create();
+ $genres = Genre::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('rss.create'));
@@ -27,8 +44,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $rss = \App\Models\Rss::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $rss = Rss::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('rss.destroy', ['id' => $rss->id]));
@@ -41,12 +58,12 @@ test('destroy returns an ok response', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $rss = \App\Models\Rss::factory()->create();
- $categories = \App\Models\Category::factory()->times(3)->create();
- $types = \App\Models\Type::factory()->times(3)->create();
- $resolutions = \App\Models\Resolution::factory()->times(3)->create();
- $genres = \App\Models\Genre::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $rss = Rss::factory()->create();
+ $categories = Category::factory()->times(3)->create();
+ $types = Type::factory()->times(3)->create();
+ $resolutions = Resolution::factory()->times(3)->create();
+ $genres = Genre::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('rss.edit', ['id' => $rss->id]));
@@ -65,12 +82,12 @@ test('edit returns an ok response', function (): void {
test('edit aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $rss = \App\Models\Rss::factory()->create();
- $categories = \App\Models\Category::factory()->times(3)->create();
- $types = \App\Models\Type::factory()->times(3)->create();
- $resolutions = \App\Models\Resolution::factory()->times(3)->create();
- $genres = \App\Models\Genre::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $rss = Rss::factory()->create();
+ $categories = Category::factory()->times(3)->create();
+ $types = Type::factory()->times(3)->create();
+ $resolutions = Resolution::factory()->times(3)->create();
+ $genres = Genre::factory()->times(3)->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -82,8 +99,8 @@ test('edit aborts with a 403', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $rsses = \App\Models\Rss::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $rsses = Rss::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('rss.index'));
@@ -100,8 +117,8 @@ test('index returns an ok response', function (): void {
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $rss = \App\Models\Rss::factory()->create();
- $torrents = \App\Models\Torrent::factory()->times(3)->create();
+ $rss = Rss::factory()->create();
+ $torrents = Torrent::factory()->times(3)->create();
$response = $this->get(route('rss.show.rsskey', ['id' => $rss->id, 'rsskey' => $rss->rsskey]));
@@ -113,8 +130,8 @@ test('show returns an ok response', function (): void {
test('show aborts with a 404', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $rss = \App\Models\Rss::factory()->create();
- $torrents = \App\Models\Torrent::factory()->times(3)->create();
+ $rss = Rss::factory()->create();
+ $torrents = Torrent::factory()->times(3)->create();
// TODO: perform additional setup to trigger `abort_if(404)`...
@@ -126,7 +143,7 @@ test('show aborts with a 404', function (): void {
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('rss.store'), [
// TODO: send request data
@@ -140,8 +157,8 @@ test('store returns an ok response', function (): void {
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $rss = \App\Models\Rss::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $rss = Rss::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('rss.update', ['id' => $rss->id]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/SimilarTorrentControllerTest.php b/tests/Feature/Http/Controllers/SimilarTorrentControllerTest.php
index 61f00e96e..eeb71dc63 100644
--- a/tests/Feature/Http/Controllers/SimilarTorrentControllerTest.php
+++ b/tests/Feature/Http/Controllers/SimilarTorrentControllerTest.php
@@ -1,16 +1,33 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Category;
+use App\Models\Movie;
+use App\Models\Tv;
+use App\Models\User;
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $category = \App\Models\Category::factory()->create();
- $movie = \App\Models\Movie::factory()->create();
- $tv = \App\Models\Tv::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $category = Category::factory()->create();
+ $movie = Movie::factory()->create();
+ $tv = Tv::factory()->create();
+ $user = User::factory()->create();
- $response = $this->actingAs($user)->get(route('torrents.similar', ['category_id' => $category_id, 'tmdb' => $tmdb]));
+ $response = $this->actingAs($user)->get(route(
+ 'torrents.similar',
+ ['category_id' => $category_id, 'tmdb' => $tmdb]
+ ));
$response->assertOk();
$response->assertViewIs('torrent.similar');
@@ -28,59 +45,17 @@ test('show returns an ok response', function (): void {
test('show aborts with a 404', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $category = \App\Models\Category::factory()->create();
- $movie = \App\Models\Movie::factory()->create();
- $tv = \App\Models\Tv::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $category = Category::factory()->create();
+ $movie = Movie::factory()->create();
+ $tv = Tv::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(404)`...
- $response = $this->actingAs($user)->get(route('torrents.similar', ['category_id' => $category_id, 'tmdb' => $tmdb]));
-
- $response->assertNotFound();
-});
-
-test('show aborts with a 404', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $category = \App\Models\Category::factory()->create();
- $movie = \App\Models\Movie::factory()->create();
- $tv = \App\Models\Tv::factory()->create();
- $user = \App\Models\User::factory()->create();
-
- // TODO: perform additional setup to trigger `abort_unless(404)`...
-
- $response = $this->actingAs($user)->get(route('torrents.similar', ['category_id' => $category_id, 'tmdb' => $tmdb]));
-
- $response->assertNotFound();
-});
-
-test('show aborts with a 404', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $category = \App\Models\Category::factory()->create();
- $movie = \App\Models\Movie::factory()->create();
- $tv = \App\Models\Tv::factory()->create();
- $user = \App\Models\User::factory()->create();
-
- // TODO: perform additional setup to trigger `abort_unless(404)`...
-
- $response = $this->actingAs($user)->get(route('torrents.similar', ['category_id' => $category_id, 'tmdb' => $tmdb]));
-
- $response->assertNotFound();
-});
-
-test('show aborts with a 404', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $category = \App\Models\Category::factory()->create();
- $movie = \App\Models\Movie::factory()->create();
- $tv = \App\Models\Tv::factory()->create();
- $user = \App\Models\User::factory()->create();
-
- // TODO: perform additional setup to trigger `abort(404)`...
-
- $response = $this->actingAs($user)->get(route('torrents.similar', ['category_id' => $category_id, 'tmdb' => $tmdb]));
+ $response = $this->actingAs($user)->get(route(
+ 'torrents.similar',
+ ['category_id' => $category_id, 'tmdb' => $tmdb]
+ ));
$response->assertNotFound();
});
diff --git a/tests/Feature/Http/Controllers/Staff/ApplicationControllerTest.php b/tests/Feature/Http/Controllers/Staff/ApplicationControllerTest.php
index 007f96f2b..21e83d28e 100644
--- a/tests/Feature/Http/Controllers/Staff/ApplicationControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/ApplicationControllerTest.php
@@ -1,20 +1,35 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\ApplicationController;
+use App\Http\Requests\Staff\ApproveApplicationRequest;
+use App\Http\Requests\Staff\RejectApplicationRequest;
+use App\Models\Application;
+use App\Models\User;
test('approve validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\ApplicationController::class,
+ ApplicationController::class,
'approve',
- \App\Http\Requests\Staff\ApproveApplicationRequest::class
+ ApproveApplicationRequest::class
);
});
test('approve returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $application = \App\Models\Application::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $application = Application::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.applications.approve', ['id' => $application->id]), [
// TODO: send request data
@@ -28,8 +43,8 @@ test('approve returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $applications = \App\Models\Application::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $applications = Application::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.applications.index'));
@@ -42,17 +57,17 @@ test('index returns an ok response', function (): void {
test('reject validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\ApplicationController::class,
+ ApplicationController::class,
'reject',
- \App\Http\Requests\Staff\RejectApplicationRequest::class
+ RejectApplicationRequest::class
);
});
test('reject returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $application = \App\Models\Application::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $application = Application::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.applications.reject', ['id' => $application->id]), [
// TODO: send request data
@@ -66,8 +81,8 @@ test('reject returns an ok response', function (): void {
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $application = \App\Models\Application::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $application = Application::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.applications.show', ['id' => $application->id]));
diff --git a/tests/Feature/Http/Controllers/Staff/ArticleControllerTest.php b/tests/Feature/Http/Controllers/Staff/ArticleControllerTest.php
index 9c6ef7524..686ffee70 100644
--- a/tests/Feature/Http/Controllers/Staff/ArticleControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/ArticleControllerTest.php
@@ -2,6 +2,8 @@
namespace Tests\Feature\Http\Controllers\Staff;
+use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
use PHPUnit\Framework\Attributes\Test;
use App\Models\Article;
use App\Models\Group;
@@ -19,7 +21,7 @@ final class ArticleControllerTest extends TestCase
parent::setUp();
}
- protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model
+ protected function createStaffUser(): Collection|Model
{
return User::factory()->create([
'group_id' => fn () => Group::factory()->create([
diff --git a/tests/Feature/Http/Controllers/Staff/ArticleControllerTest.shift.php b/tests/Feature/Http/Controllers/Staff/ArticleControllerTest.shift.php
index d0639b50a..317d9739d 100644
--- a/tests/Feature/Http/Controllers/Staff/ArticleControllerTest.shift.php
+++ b/tests/Feature/Http/Controllers/Staff/ArticleControllerTest.shift.php
@@ -1,11 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\ArticleController;
+use App\Http\Requests\Staff\StoreArticleRequest;
+use App\Http\Requests\Staff\UpdateArticleRequest;
+use App\Models\Article;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.articles.create'));
@@ -18,8 +33,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $article = \App\Models\Article::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $article = Article::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.articles.destroy', [$article]));
@@ -32,8 +47,8 @@ test('destroy returns an ok response', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $article = \App\Models\Article::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $article = Article::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.articles.edit', [$article]));
@@ -47,8 +62,8 @@ test('edit returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $articles = \App\Models\Article::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $articles = Article::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.articles.index'));
@@ -61,16 +76,16 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\ArticleController::class,
+ ArticleController::class,
'store',
- \App\Http\Requests\Staff\StoreArticleRequest::class
+ StoreArticleRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.articles.store'), [
// TODO: send request data
@@ -83,17 +98,17 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\ArticleController::class,
+ ArticleController::class,
'update',
- \App\Http\Requests\Staff\UpdateArticleRequest::class
+ UpdateArticleRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $article = \App\Models\Article::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $article = Article::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.articles.update', [$article]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/AuditControllerTest.php b/tests/Feature/Http/Controllers/Staff/AuditControllerTest.php
index 61487bfae..cc4d5a905 100644
--- a/tests/Feature/Http/Controllers/Staff/AuditControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/AuditControllerTest.php
@@ -1,12 +1,24 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Audit;
+use App\Models\User;
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $audit = \App\Models\Audit::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $audit = Audit::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.audits.destroy', [$audit]));
@@ -19,7 +31,7 @@ test('destroy returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.audits.index'));
diff --git a/tests/Feature/Http/Controllers/Staff/AuthenticationControllerTest.php b/tests/Feature/Http/Controllers/Staff/AuthenticationControllerTest.php
index 9f690e84c..73b4f8a9b 100644
--- a/tests/Feature/Http/Controllers/Staff/AuthenticationControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/AuthenticationControllerTest.php
@@ -1,11 +1,22 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.authentications.index'));
diff --git a/tests/Feature/Http/Controllers/Staff/BackupControllerTest.php b/tests/Feature/Http/Controllers/Staff/BackupControllerTest.php
index 04f72efa3..157ed58f3 100644
--- a/tests/Feature/Http/Controllers/Staff/BackupControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/BackupControllerTest.php
@@ -1,11 +1,22 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.backups.index'));
diff --git a/tests/Feature/Http/Controllers/Staff/BanControllerTest.php b/tests/Feature/Http/Controllers/Staff/BanControllerTest.php
index 8a1bbc061..97a71aa9c 100644
--- a/tests/Feature/Http/Controllers/Staff/BanControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/BanControllerTest.php
@@ -1,12 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\BanController;
+use App\Http\Requests\Staff\StoreBanRequest;
+use App\Models\Ban;
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $bans = \App\Models\Ban::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $bans = Ban::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.bans.index'));
@@ -19,17 +33,17 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\BanController::class,
+ BanController::class,
'store',
- \App\Http\Requests\Staff\StoreBanRequest::class
+ StoreBanRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post(route('staff.bans.store'), [
// TODO: send request data
@@ -43,8 +57,8 @@ test('store returns an ok response', function (): void {
test('store aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_if(403)`...
diff --git a/tests/Feature/Http/Controllers/Staff/BlacklistClientControllerTest.php b/tests/Feature/Http/Controllers/Staff/BlacklistClientControllerTest.php
index 4565c29ff..2b60fdf39 100644
--- a/tests/Feature/Http/Controllers/Staff/BlacklistClientControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/BlacklistClientControllerTest.php
@@ -1,11 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\BlacklistClientController;
+use App\Http\Requests\Staff\StoreBlacklistClientRequest;
+use App\Http\Requests\Staff\UpdateBlacklistClientRequest;
+use App\Models\BlacklistClient;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.blacklisted_clients.create'));
@@ -18,8 +33,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $blacklistClient = \App\Models\BlacklistClient::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $blacklistClient = BlacklistClient::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.blacklisted_clients.destroy', [$blacklistClient]));
@@ -32,8 +47,8 @@ test('destroy returns an ok response', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $blacklistClient = \App\Models\BlacklistClient::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $blacklistClient = BlacklistClient::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.blacklisted_clients.edit', [$blacklistClient]));
@@ -47,8 +62,8 @@ test('edit returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $blacklistClients = \App\Models\BlacklistClient::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $blacklistClients = BlacklistClient::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.blacklisted_clients.index'));
@@ -61,16 +76,16 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\BlacklistClientController::class,
+ BlacklistClientController::class,
'store',
- \App\Http\Requests\Staff\StoreBlacklistClientRequest::class
+ StoreBlacklistClientRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.blacklisted_clients.store'), [
// TODO: send request data
@@ -83,17 +98,17 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\BlacklistClientController::class,
+ BlacklistClientController::class,
'update',
- \App\Http\Requests\Staff\UpdateBlacklistClientRequest::class
+ UpdateBlacklistClientRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $blacklistClient = \App\Models\BlacklistClient::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $blacklistClient = BlacklistClient::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.blacklisted_clients.update', [$blacklistClient]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/BonExchangeControllerTest.php b/tests/Feature/Http/Controllers/Staff/BonExchangeControllerTest.php
index a966a0e4d..c77d129a4 100644
--- a/tests/Feature/Http/Controllers/Staff/BonExchangeControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/BonExchangeControllerTest.php
@@ -1,11 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\BonExchangeController;
+use App\Http\Requests\Staff\StoreBonExchangeRequest;
+use App\Http\Requests\Staff\UpdateBonExchangeRequest;
+use App\Models\BonExchange;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.bon_exchanges.create'));
@@ -18,8 +33,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $bonExchange = \App\Models\BonExchange::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $bonExchange = BonExchange::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.bon_exchanges.destroy', [$bonExchange]));
@@ -32,8 +47,8 @@ test('destroy returns an ok response', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $bonExchange = \App\Models\BonExchange::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $bonExchange = BonExchange::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.bon_exchanges.edit', [$bonExchange]));
@@ -47,8 +62,8 @@ test('edit returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $bonExchanges = \App\Models\BonExchange::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $bonExchanges = BonExchange::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.bon_exchanges.index'));
@@ -61,16 +76,16 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\BonExchangeController::class,
+ BonExchangeController::class,
'store',
- \App\Http\Requests\Staff\StoreBonExchangeRequest::class
+ StoreBonExchangeRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.bon_exchanges.store'), [
// TODO: send request data
@@ -83,17 +98,17 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\BonExchangeController::class,
+ BonExchangeController::class,
'update',
- \App\Http\Requests\Staff\UpdateBonExchangeRequest::class
+ UpdateBonExchangeRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $bonExchange = \App\Models\BonExchange::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $bonExchange = BonExchange::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.bon_exchanges.update', [$bonExchange]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/CategoryControllerTest.php b/tests/Feature/Http/Controllers/Staff/CategoryControllerTest.php
index 86bffa0a3..09a721294 100644
--- a/tests/Feature/Http/Controllers/Staff/CategoryControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/CategoryControllerTest.php
@@ -2,6 +2,8 @@
namespace Tests\Feature\Http\Controllers\Staff;
+use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
use PHPUnit\Framework\Attributes\Test;
use App\Models\Category;
use App\Models\Group;
@@ -19,7 +21,7 @@ final class CategoryControllerTest extends TestCase
parent::setUp();
}
- protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model
+ protected function createStaffUser(): Collection|Model
{
return User::factory()->create([
'group_id' => fn () => Group::factory()->create([
diff --git a/tests/Feature/Http/Controllers/Staff/CategoryControllerTest.shift.php b/tests/Feature/Http/Controllers/Staff/CategoryControllerTest.shift.php
index 0c38802df..d965b7f17 100644
--- a/tests/Feature/Http/Controllers/Staff/CategoryControllerTest.shift.php
+++ b/tests/Feature/Http/Controllers/Staff/CategoryControllerTest.shift.php
@@ -1,11 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\CategoryController;
+use App\Http\Requests\Staff\StoreCategoryRequest;
+use App\Http\Requests\Staff\UpdateCategoryRequest;
+use App\Models\Category;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.categories.create'));
@@ -18,8 +33,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $category = \App\Models\Category::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $category = Category::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.categories.destroy', [$category]));
@@ -32,8 +47,8 @@ test('destroy returns an ok response', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $category = \App\Models\Category::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $category = Category::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.categories.edit', [$category]));
@@ -47,8 +62,8 @@ test('edit returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $categories = \App\Models\Category::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $categories = Category::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.categories.index'));
@@ -61,16 +76,16 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\CategoryController::class,
+ CategoryController::class,
'store',
- \App\Http\Requests\Staff\StoreCategoryRequest::class
+ StoreCategoryRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.categories.store'), [
// TODO: send request data
@@ -83,17 +98,17 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\CategoryController::class,
+ CategoryController::class,
'update',
- \App\Http\Requests\Staff\UpdateCategoryRequest::class
+ UpdateCategoryRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $category = \App\Models\Category::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $category = Category::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.categories.update', [$category]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/ChatBotControllerTest.php b/tests/Feature/Http/Controllers/Staff/ChatBotControllerTest.php
index 081eef3cc..98f5b7d99 100644
--- a/tests/Feature/Http/Controllers/Staff/ChatBotControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/ChatBotControllerTest.php
@@ -2,6 +2,8 @@
namespace Tests\Feature\Http\Controllers\Staff;
+use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
use PHPUnit\Framework\Attributes\Test;
use App\Models\Bot;
use App\Models\Group;
@@ -19,7 +21,7 @@ final class ChatBotControllerTest extends TestCase
parent::setUp();
}
- protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model
+ protected function createStaffUser(): Collection|Model
{
return User::factory()->create([
'group_id' => fn () => Group::factory()->create([
diff --git a/tests/Feature/Http/Controllers/Staff/ChatBotControllerTest.shift.php b/tests/Feature/Http/Controllers/Staff/ChatBotControllerTest.shift.php
index 2638bf762..871f492a8 100644
--- a/tests/Feature/Http/Controllers/Staff/ChatBotControllerTest.shift.php
+++ b/tests/Feature/Http/Controllers/Staff/ChatBotControllerTest.shift.php
@@ -1,12 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\ChatBotController;
+use App\Http\Requests\Staff\UpdateChatBotRequest;
+use App\Models\Bot;
+use App\Models\User;
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $bot = \App\Models\Bot::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $bot = Bot::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.bots.destroy', [$bot]));
@@ -19,8 +33,8 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $bot = \App\Models\Bot::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $bot = Bot::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_if(403)`...
@@ -32,8 +46,8 @@ test('destroy aborts with a 403', function (): void {
test('disable returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $bot = \App\Models\Bot::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $bot = Bot::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.bots.disable', [$bot]), [
// TODO: send request data
@@ -47,8 +61,8 @@ test('disable returns an ok response', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $bot = \App\Models\Bot::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $bot = Bot::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.bots.edit', [$bot]));
@@ -63,8 +77,8 @@ test('edit returns an ok response', function (): void {
test('enable returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $bot = \App\Models\Bot::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $bot = Bot::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.bots.enable', [$bot]), [
// TODO: send request data
@@ -78,8 +92,8 @@ test('enable returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $bots = \App\Models\Bot::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $bots = Bot::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.bots.index'));
@@ -92,17 +106,17 @@ test('index returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\ChatBotController::class,
+ ChatBotController::class,
'update',
- \App\Http\Requests\Staff\UpdateChatBotRequest::class
+ UpdateChatBotRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $bot = \App\Models\Bot::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $bot = Bot::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.bots.update', [$bot]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/ChatRoomControllerTest.php b/tests/Feature/Http/Controllers/Staff/ChatRoomControllerTest.php
index 0f9c525a5..4319bdef9 100644
--- a/tests/Feature/Http/Controllers/Staff/ChatRoomControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/ChatRoomControllerTest.php
@@ -2,6 +2,8 @@
namespace Tests\Feature\Http\Controllers\Staff;
+use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
use PHPUnit\Framework\Attributes\Test;
use App\Models\Chatroom;
use App\Models\Group;
@@ -20,7 +22,7 @@ final class ChatRoomControllerTest extends TestCase
parent::setUp();
}
- protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model
+ protected function createStaffUser(): Collection|Model
{
return User::factory()->create([
'group_id' => fn () => Group::factory()->create([
diff --git a/tests/Feature/Http/Controllers/Staff/ChatRoomControllerTest.shift.php b/tests/Feature/Http/Controllers/Staff/ChatRoomControllerTest.shift.php
index eecd3eb42..a1c0b357e 100644
--- a/tests/Feature/Http/Controllers/Staff/ChatRoomControllerTest.shift.php
+++ b/tests/Feature/Http/Controllers/Staff/ChatRoomControllerTest.shift.php
@@ -1,11 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\ChatRoomController;
+use App\Http\Requests\Staff\StoreChatRoomRequest;
+use App\Http\Requests\Staff\UpdateChatRoomRequest;
+use App\Models\Chatroom;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.chatrooms.create'));
@@ -18,8 +33,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $chatroom = \App\Models\Chatroom::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $chatroom = Chatroom::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.chatrooms.destroy', [$chatroom]));
@@ -32,8 +47,8 @@ test('destroy returns an ok response', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $chatroom = \App\Models\Chatroom::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $chatroom = Chatroom::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.chatrooms.edit', [$chatroom]));
@@ -47,7 +62,7 @@ test('edit returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.chatrooms.index'));
@@ -60,16 +75,16 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\ChatRoomController::class,
+ ChatRoomController::class,
'store',
- \App\Http\Requests\Staff\StoreChatRoomRequest::class
+ StoreChatRoomRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.chatrooms.store'), [
// TODO: send request data
@@ -82,17 +97,17 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\ChatRoomController::class,
+ ChatRoomController::class,
'update',
- \App\Http\Requests\Staff\UpdateChatRoomRequest::class
+ UpdateChatRoomRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $chatroom = \App\Models\Chatroom::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $chatroom = Chatroom::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.chatrooms.update', [$chatroom]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/ChatStatusControllerTest.php b/tests/Feature/Http/Controllers/Staff/ChatStatusControllerTest.php
index 1e6e9ad49..6befd6c67 100644
--- a/tests/Feature/Http/Controllers/Staff/ChatStatusControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/ChatStatusControllerTest.php
@@ -2,6 +2,8 @@
namespace Tests\Feature\Http\Controllers\Staff;
+use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
use PHPUnit\Framework\Attributes\Test;
use App\Models\ChatStatus;
use App\Models\Group;
@@ -19,7 +21,7 @@ final class ChatStatusControllerTest extends TestCase
parent::setUp();
}
- protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model
+ protected function createStaffUser(): Collection|Model
{
return User::factory()->create([
'group_id' => fn () => Group::factory()->create([
diff --git a/tests/Feature/Http/Controllers/Staff/ChatStatusControllerTest.shift.php b/tests/Feature/Http/Controllers/Staff/ChatStatusControllerTest.shift.php
index 00adcd44c..c41c2f879 100644
--- a/tests/Feature/Http/Controllers/Staff/ChatStatusControllerTest.shift.php
+++ b/tests/Feature/Http/Controllers/Staff/ChatStatusControllerTest.shift.php
@@ -1,11 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\ChatStatusController;
+use App\Http\Requests\Staff\StoreChatStatusRequest;
+use App\Http\Requests\Staff\UpdateChatStatusRequest;
+use App\Models\ChatStatus;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.statuses.create'));
@@ -18,8 +33,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $chatStatus = \App\Models\ChatStatus::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $chatStatus = ChatStatus::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.statuses.destroy', [$chatStatus]));
@@ -32,8 +47,8 @@ test('destroy returns an ok response', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $chatStatus = \App\Models\ChatStatus::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $chatStatus = ChatStatus::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.statuses.edit', [$chatStatus]));
@@ -47,8 +62,8 @@ test('edit returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $chatStatuses = \App\Models\ChatStatus::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $chatStatuses = ChatStatus::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.statuses.index'));
@@ -61,16 +76,16 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\ChatStatusController::class,
+ ChatStatusController::class,
'store',
- \App\Http\Requests\Staff\StoreChatStatusRequest::class
+ StoreChatStatusRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.statuses.store'), [
// TODO: send request data
@@ -83,17 +98,17 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\ChatStatusController::class,
+ ChatStatusController::class,
'update',
- \App\Http\Requests\Staff\UpdateChatStatusRequest::class
+ UpdateChatStatusRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $chatStatus = \App\Models\ChatStatus::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $chatStatus = ChatStatus::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.statuses.update', [$chatStatus]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/CheatedTorrentControllerTest.php b/tests/Feature/Http/Controllers/Staff/CheatedTorrentControllerTest.php
index 998888746..26544b281 100644
--- a/tests/Feature/Http/Controllers/Staff/CheatedTorrentControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/CheatedTorrentControllerTest.php
@@ -1,14 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Torrent;
+use App\Models\User;
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
- $response = $this->actingAs($user)->delete(route('staff.cheated_torrents.destroy', ['cheatedTorrent' => $cheatedTorrent]));
+ $response = $this->actingAs($user)->delete(route(
+ 'staff.cheated_torrents.destroy',
+ ['cheatedTorrent' => $cheatedTorrent]
+ ));
$response->assertOk();
$this->assertModelMissing($cheatedTorrent);
@@ -19,8 +34,8 @@ test('destroy returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrents = \App\Models\Torrent::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $torrents = Torrent::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.cheated_torrents.index'));
@@ -34,7 +49,7 @@ test('index returns an ok response', function (): void {
test('mass destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.cheated_torrents.massDestroy'));
diff --git a/tests/Feature/Http/Controllers/Staff/CheaterControllerTest.php b/tests/Feature/Http/Controllers/Staff/CheaterControllerTest.php
index c31729f7a..c19442324 100644
--- a/tests/Feature/Http/Controllers/Staff/CheaterControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/CheaterControllerTest.php
@@ -2,6 +2,8 @@
namespace Tests\Feature\Http\Controllers\Staff;
+use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
use PHPUnit\Framework\Attributes\Test;
use App\Models\Group;
use App\Models\User;
@@ -18,7 +20,7 @@ final class CheaterControllerTest extends TestCase
parent::setUp();
}
- protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model
+ protected function createStaffUser(): Collection|Model
{
return User::factory()->create([
'group_id' => fn () => Group::factory()->create([
diff --git a/tests/Feature/Http/Controllers/Staff/CheaterControllerTest.shift.php b/tests/Feature/Http/Controllers/Staff/CheaterControllerTest.shift.php
index f06eac9c5..67cfa42db 100644
--- a/tests/Feature/Http/Controllers/Staff/CheaterControllerTest.shift.php
+++ b/tests/Feature/Http/Controllers/Staff/CheaterControllerTest.shift.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $users = \App\Models\User::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $users = User::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.cheaters.index'));
diff --git a/tests/Feature/Http/Controllers/Staff/CommandControllerTest.php b/tests/Feature/Http/Controllers/Staff/CommandControllerTest.php
index bc69bf6f7..002532ca0 100644
--- a/tests/Feature/Http/Controllers/Staff/CommandControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/CommandControllerTest.php
@@ -1,11 +1,22 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('clear all cache returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.'), [
// TODO: send request data
@@ -19,7 +30,7 @@ test('clear all cache returns an ok response', function (): void {
test('clear cache returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.'), [
// TODO: send request data
@@ -33,7 +44,7 @@ test('clear cache returns an ok response', function (): void {
test('clear config returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.'), [
// TODO: send request data
@@ -47,7 +58,7 @@ test('clear config returns an ok response', function (): void {
test('clear route returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.'), [
// TODO: send request data
@@ -61,7 +72,7 @@ test('clear route returns an ok response', function (): void {
test('clear view returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.'), [
// TODO: send request data
@@ -75,7 +86,7 @@ test('clear view returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.commands.index'));
@@ -88,7 +99,7 @@ test('index returns an ok response', function (): void {
test('maintance disable returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.'), [
// TODO: send request data
@@ -102,7 +113,7 @@ test('maintance disable returns an ok response', function (): void {
test('maintance enable returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.'), [
// TODO: send request data
@@ -116,7 +127,7 @@ test('maintance enable returns an ok response', function (): void {
test('set all cache returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.'), [
// TODO: send request data
@@ -130,7 +141,7 @@ test('set all cache returns an ok response', function (): void {
test('test email returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.'), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/DistributorControllerTest.php b/tests/Feature/Http/Controllers/Staff/DistributorControllerTest.php
index ce32506cf..4d4d59e44 100644
--- a/tests/Feature/Http/Controllers/Staff/DistributorControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/DistributorControllerTest.php
@@ -1,11 +1,27 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\DistributorController;
+use App\Http\Requests\Staff\DestroyDistributorRequest;
+use App\Http\Requests\Staff\StoreDistributorRequest;
+use App\Http\Requests\Staff\UpdateDistributorRequest;
+use App\Models\Distributor;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.distributors.create'));
@@ -18,9 +34,9 @@ test('create returns an ok response', function (): void {
test('delete returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $distributor = \App\Models\Distributor::factory()->create();
- $distributors = \App\Models\Distributor::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $distributor = Distributor::factory()->create();
+ $distributors = Distributor::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.distributors.delete', [$distributor]));
@@ -34,17 +50,17 @@ test('delete returns an ok response', function (): void {
test('destroy validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\DistributorController::class,
+ DistributorController::class,
'destroy',
- \App\Http\Requests\Staff\DestroyDistributorRequest::class
+ DestroyDistributorRequest::class
);
});
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $distributor = \App\Models\Distributor::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $distributor = Distributor::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.distributors.destroy', [$distributor]));
@@ -57,8 +73,8 @@ test('destroy returns an ok response', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $distributor = \App\Models\Distributor::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $distributor = Distributor::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.distributors.edit', [$distributor]));
@@ -72,8 +88,8 @@ test('edit returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $distributors = \App\Models\Distributor::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $distributors = Distributor::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.distributors.index'));
@@ -86,16 +102,16 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\DistributorController::class,
+ DistributorController::class,
'store',
- \App\Http\Requests\Staff\StoreDistributorRequest::class
+ StoreDistributorRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.distributors.store'), [
// TODO: send request data
@@ -108,17 +124,17 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\DistributorController::class,
+ DistributorController::class,
'update',
- \App\Http\Requests\Staff\UpdateDistributorRequest::class
+ UpdateDistributorRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $distributor = \App\Models\Distributor::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $distributor = Distributor::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.distributors.update', [$distributor]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/FlushControllerTest.php b/tests/Feature/Http/Controllers/Staff/FlushControllerTest.php
index 6c963d7f1..e0abeb508 100644
--- a/tests/Feature/Http/Controllers/Staff/FlushControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/FlushControllerTest.php
@@ -1,12 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\History;
+use App\Models\Message;
+use App\Models\Peer;
+use App\Models\User;
test('chat returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $messages = \App\Models\Message::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $messages = Message::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.flush.chat'), [
// TODO: send request data
@@ -20,9 +34,9 @@ test('chat returns an ok response', function (): void {
test('peers returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $history = \App\Models\History::factory()->create();
- $peers = \App\Models\Peer::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $history = History::factory()->create();
+ $peers = Peer::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.flush.peers'), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/ForumControllerTest.php b/tests/Feature/Http/Controllers/Staff/ForumControllerTest.php
index 6bfe18507..5a60955f7 100644
--- a/tests/Feature/Http/Controllers/Staff/ForumControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/ForumControllerTest.php
@@ -1,13 +1,30 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\ForumController;
+use App\Http\Requests\Staff\StoreForumRequest;
+use App\Http\Requests\Staff\UpdateForumRequest;
+use App\Models\Forum;
+use App\Models\Group;
+use App\Models\Permission;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $forums = \App\Models\Forum::factory()->times(3)->create();
- $groups = \App\Models\Group::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $forums = Forum::factory()->times(3)->create();
+ $groups = Group::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.forums.create'));
@@ -22,8 +39,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $forum = \App\Models\Forum::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $forum = Forum::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.forums.destroy', [$forum]));
@@ -36,10 +53,10 @@ test('destroy returns an ok response', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $forum = \App\Models\Forum::factory()->create();
- $forums = \App\Models\Forum::factory()->times(3)->create();
- $groups = \App\Models\Group::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $forum = Forum::factory()->create();
+ $forums = Forum::factory()->times(3)->create();
+ $groups = Group::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.forums.edit', [$forum]));
@@ -55,8 +72,8 @@ test('edit returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $forums = \App\Models\Forum::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $forums = Forum::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.forums.index'));
@@ -69,18 +86,18 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\ForumController::class,
+ ForumController::class,
'store',
- \App\Http\Requests\Staff\StoreForumRequest::class
+ StoreForumRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $permission = \App\Models\Permission::factory()->create();
- $groups = \App\Models\Group::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $permission = Permission::factory()->create();
+ $groups = Group::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.forums.store'), [
// TODO: send request data
@@ -93,18 +110,18 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\ForumController::class,
+ ForumController::class,
'update',
- \App\Http\Requests\Staff\UpdateForumRequest::class
+ UpdateForumRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $forum = \App\Models\Forum::factory()->create();
- $groups = \App\Models\Group::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $forum = Forum::factory()->create();
+ $groups = Group::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.forums.update', [$forum]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/GroupControllerTest.php b/tests/Feature/Http/Controllers/Staff/GroupControllerTest.php
index 7cf227555..cbe043b4d 100644
--- a/tests/Feature/Http/Controllers/Staff/GroupControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/GroupControllerTest.php
@@ -2,6 +2,8 @@
namespace Tests\Feature\Http\Controllers\Staff;
+use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
use PHPUnit\Framework\Attributes\Test;
use App\Models\Group;
use App\Models\User;
@@ -18,7 +20,7 @@ final class GroupControllerTest extends TestCase
parent::setUp();
}
- protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model
+ protected function createStaffUser(): Collection|Model
{
return User::factory()->create([
'group_id' => fn () => Group::factory()->create([
diff --git a/tests/Feature/Http/Controllers/Staff/GroupControllerTest.shift.php b/tests/Feature/Http/Controllers/Staff/GroupControllerTest.shift.php
index 6661de070..9e141b2c9 100644
--- a/tests/Feature/Http/Controllers/Staff/GroupControllerTest.shift.php
+++ b/tests/Feature/Http/Controllers/Staff/GroupControllerTest.shift.php
@@ -1,11 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\GroupController;
+use App\Http\Requests\Staff\StoreGroupRequest;
+use App\Http\Requests\Staff\UpdateGroupRequest;
+use App\Models\Group;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.groups.create'));
@@ -18,8 +33,8 @@ test('create returns an ok response', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $group = \App\Models\Group::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $group = Group::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.groups.edit', [$group]));
@@ -33,8 +48,8 @@ test('edit returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $groups = \App\Models\Group::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $groups = Group::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.groups.index'));
@@ -47,16 +62,16 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\GroupController::class,
+ GroupController::class,
'store',
- \App\Http\Requests\Staff\StoreGroupRequest::class
+ StoreGroupRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.groups.store'), [
// TODO: send request data
@@ -69,18 +84,18 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\GroupController::class,
+ GroupController::class,
'update',
- \App\Http\Requests\Staff\UpdateGroupRequest::class
+ UpdateGroupRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $group = \App\Models\Group::factory()->create();
- $users = \App\Models\User::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $group = Group::factory()->create();
+ $users = User::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.groups.update', [$group]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/HomeControllerTest.php b/tests/Feature/Http/Controllers/Staff/HomeControllerTest.php
index 5afb732b8..aa481c276 100644
--- a/tests/Feature/Http/Controllers/Staff/HomeControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/HomeControllerTest.php
@@ -1,11 +1,22 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.dashboard.index'));
diff --git a/tests/Feature/Http/Controllers/Staff/InternalControllerTest.php b/tests/Feature/Http/Controllers/Staff/InternalControllerTest.php
index 905c45ef4..ef3b3a30c 100644
--- a/tests/Feature/Http/Controllers/Staff/InternalControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/InternalControllerTest.php
@@ -1,11 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\InternalController;
+use App\Http\Requests\Staff\StoreInternalRequest;
+use App\Http\Requests\Staff\UpdateInternalRequest;
+use App\Models\Internal;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.internals.create'));
@@ -18,8 +33,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $internal = \App\Models\Internal::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $internal = Internal::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.internals.destroy', [$internal]));
@@ -32,8 +47,8 @@ test('destroy returns an ok response', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $internal = \App\Models\Internal::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $internal = Internal::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.internals.edit', [$internal]));
@@ -47,8 +62,8 @@ test('edit returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $internals = \App\Models\Internal::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $internals = Internal::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.internals.index'));
@@ -61,16 +76,16 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\InternalController::class,
+ InternalController::class,
'store',
- \App\Http\Requests\Staff\StoreInternalRequest::class
+ StoreInternalRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.internals.store'), [
// TODO: send request data
@@ -83,17 +98,17 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\InternalController::class,
+ InternalController::class,
'update',
- \App\Http\Requests\Staff\UpdateInternalRequest::class
+ UpdateInternalRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $internal = \App\Models\Internal::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $internal = Internal::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.internals.update', [$internal]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/InviteControllerTest.php b/tests/Feature/Http/Controllers/Staff/InviteControllerTest.php
index 3f46522c0..588bb94a9 100644
--- a/tests/Feature/Http/Controllers/Staff/InviteControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/InviteControllerTest.php
@@ -2,6 +2,8 @@
namespace Tests\Feature\Http\Controllers\Staff;
+use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
use PHPUnit\Framework\Attributes\Test;
use App\Http\Livewire\InviteLogSearch;
use App\Models\Group;
@@ -19,7 +21,7 @@ final class InviteControllerTest extends TestCase
parent::setUp();
}
- protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model
+ protected function createStaffUser(): Collection|Model
{
return User::factory()->create([
'group_id' => fn () => Group::factory()->create([
diff --git a/tests/Feature/Http/Controllers/Staff/InviteControllerTest.shift.php b/tests/Feature/Http/Controllers/Staff/InviteControllerTest.shift.php
index a0cbd9f22..2498235ec 100644
--- a/tests/Feature/Http/Controllers/Staff/InviteControllerTest.shift.php
+++ b/tests/Feature/Http/Controllers/Staff/InviteControllerTest.shift.php
@@ -1,11 +1,22 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.invites.index'));
diff --git a/tests/Feature/Http/Controllers/Staff/MassActionControllerTest.php b/tests/Feature/Http/Controllers/Staff/MassActionControllerTest.php
index f42fe7abe..1d136a97a 100644
--- a/tests/Feature/Http/Controllers/Staff/MassActionControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/MassActionControllerTest.php
@@ -2,6 +2,8 @@
namespace Tests\Feature\Http\Controllers\Staff;
+use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
use PHPUnit\Framework\Attributes\Test;
use App\Models\Group;
use App\Models\PrivateMessage;
@@ -19,7 +21,7 @@ final class MassActionControllerTest extends TestCase
parent::setUp();
}
- protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model
+ protected function createStaffUser(): Collection|Model
{
return User::factory()->create([
'group_id' => fn () => Group::factory()->create([
diff --git a/tests/Feature/Http/Controllers/Staff/MassActionControllerTest.shift.php b/tests/Feature/Http/Controllers/Staff/MassActionControllerTest.shift.php
index 3db927443..46c7d1c5e 100644
--- a/tests/Feature/Http/Controllers/Staff/MassActionControllerTest.shift.php
+++ b/tests/Feature/Http/Controllers/Staff/MassActionControllerTest.shift.php
@@ -1,11 +1,24 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\MassActionController;
+use App\Http\Requests\Staff\StoreMassActionRequest;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.mass-pm.create'));
@@ -17,16 +30,16 @@ test('create returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\MassActionController::class,
+ MassActionController::class,
'store',
- \App\Http\Requests\Staff\StoreMassActionRequest::class
+ StoreMassActionRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.mass-pm.store'), [
// TODO: send request data
@@ -40,8 +53,8 @@ test('store returns an ok response', function (): void {
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $users = \App\Models\User::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $users = User::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.mass-actions.validate'));
diff --git a/tests/Feature/Http/Controllers/Staff/MediaLanguageControllerTest.php b/tests/Feature/Http/Controllers/Staff/MediaLanguageControllerTest.php
index b0b9914cb..4c404dda2 100644
--- a/tests/Feature/Http/Controllers/Staff/MediaLanguageControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/MediaLanguageControllerTest.php
@@ -1,11 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\MediaLanguageController;
+use App\Http\Requests\Staff\StoreMediaLanguageRequest;
+use App\Http\Requests\Staff\UpdateMediaLanguageRequest;
+use App\Models\MediaLanguage;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.media_languages.create'));
@@ -18,8 +33,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $mediaLanguage = \App\Models\MediaLanguage::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $mediaLanguage = MediaLanguage::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.media_languages.destroy', [$mediaLanguage]));
@@ -32,8 +47,8 @@ test('destroy returns an ok response', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $mediaLanguage = \App\Models\MediaLanguage::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $mediaLanguage = MediaLanguage::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.media_languages.edit', [$mediaLanguage]));
@@ -47,8 +62,8 @@ test('edit returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $mediaLanguages = \App\Models\MediaLanguage::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $mediaLanguages = MediaLanguage::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.media_languages.index'));
@@ -61,16 +76,16 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\MediaLanguageController::class,
+ MediaLanguageController::class,
'store',
- \App\Http\Requests\Staff\StoreMediaLanguageRequest::class
+ StoreMediaLanguageRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.media_languages.store'), [
// TODO: send request data
@@ -83,17 +98,17 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\MediaLanguageController::class,
+ MediaLanguageController::class,
'update',
- \App\Http\Requests\Staff\UpdateMediaLanguageRequest::class
+ UpdateMediaLanguageRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $mediaLanguage = \App\Models\MediaLanguage::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $mediaLanguage = MediaLanguage::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.media_languages.update', [$mediaLanguage]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/ModerationControllerTest.php b/tests/Feature/Http/Controllers/Staff/ModerationControllerTest.php
index dd393f9ed..56084817a 100644
--- a/tests/Feature/Http/Controllers/Staff/ModerationControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/ModerationControllerTest.php
@@ -1,12 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\ModerationController;
+use App\Http\Requests\Staff\UpdateModerationRequest;
+use App\Models\Torrent;
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrents = \App\Models\Torrent::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $torrents = Torrent::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.moderation.index'));
@@ -22,17 +36,17 @@ test('index returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\ModerationController::class,
+ ModerationController::class,
'update',
- \App\Http\Requests\Staff\UpdateModerationRequest::class
+ UpdateModerationRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.moderation.update', ['id' => $id]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/NoteControllerTest.php b/tests/Feature/Http/Controllers/Staff/NoteControllerTest.php
index 071cb2000..20638ef5d 100644
--- a/tests/Feature/Http/Controllers/Staff/NoteControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/NoteControllerTest.php
@@ -1,12 +1,24 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Note;
+use App\Models\User;
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $note = \App\Models\Note::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $note = Note::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.notes.destroy', [$note]));
@@ -19,7 +31,7 @@ test('destroy returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.notes.index'));
diff --git a/tests/Feature/Http/Controllers/Staff/PageControllerTest.php b/tests/Feature/Http/Controllers/Staff/PageControllerTest.php
index 8d6e5c51f..a947bcd39 100644
--- a/tests/Feature/Http/Controllers/Staff/PageControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/PageControllerTest.php
@@ -2,6 +2,8 @@
namespace Tests\Feature\Http\Controllers\Staff;
+use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
use PHPUnit\Framework\Attributes\Test;
use App\Models\Group;
use App\Models\Page;
@@ -19,7 +21,7 @@ final class PageControllerTest extends TestCase
parent::setUp();
}
- protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model
+ protected function createStaffUser(): Collection|Model
{
return User::factory()->create([
'group_id' => fn () => Group::factory()->create([
diff --git a/tests/Feature/Http/Controllers/Staff/PageControllerTest.shift.php b/tests/Feature/Http/Controllers/Staff/PageControllerTest.shift.php
index 17244763d..040e60bf3 100644
--- a/tests/Feature/Http/Controllers/Staff/PageControllerTest.shift.php
+++ b/tests/Feature/Http/Controllers/Staff/PageControllerTest.shift.php
@@ -1,11 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\PageController;
+use App\Http\Requests\Staff\StorePageRequest;
+use App\Http\Requests\Staff\UpdatePageRequest;
+use App\Models\Page;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.pages.create'));
@@ -18,8 +33,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $page = \App\Models\Page::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $page = Page::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.pages.destroy', [$page]));
@@ -32,8 +47,8 @@ test('destroy returns an ok response', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $page = \App\Models\Page::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $page = Page::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.pages.edit', [$page]));
@@ -47,8 +62,8 @@ test('edit returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $pages = \App\Models\Page::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $pages = Page::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.pages.index'));
@@ -61,16 +76,16 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\PageController::class,
+ PageController::class,
'store',
- \App\Http\Requests\Staff\StorePageRequest::class
+ StorePageRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.pages.store'), [
// TODO: send request data
@@ -83,17 +98,17 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\PageController::class,
+ PageController::class,
'update',
- \App\Http\Requests\Staff\UpdatePageRequest::class
+ UpdatePageRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $page = \App\Models\Page::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $page = Page::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.pages.update', [$page]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/PeerControllerTest.php b/tests/Feature/Http/Controllers/Staff/PeerControllerTest.php
index 0847d096f..2e7e9e3d9 100644
--- a/tests/Feature/Http/Controllers/Staff/PeerControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/PeerControllerTest.php
@@ -1,11 +1,22 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.peers.index'));
diff --git a/tests/Feature/Http/Controllers/Staff/PollControllerTest.php b/tests/Feature/Http/Controllers/Staff/PollControllerTest.php
index f9429e840..61fe875a7 100644
--- a/tests/Feature/Http/Controllers/Staff/PollControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/PollControllerTest.php
@@ -1,11 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\PollController;
+use App\Http\Requests\StorePoll;
+use App\Http\Requests\UpdatePollRequest;
+use App\Models\Poll;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.polls.create'));
@@ -18,8 +33,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $poll = \App\Models\Poll::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $poll = Poll::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.polls.destroy', [$poll]));
@@ -32,8 +47,8 @@ test('destroy returns an ok response', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $poll = \App\Models\Poll::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $poll = Poll::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.polls.edit', [$poll]));
@@ -47,8 +62,8 @@ test('edit returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $polls = \App\Models\Poll::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $polls = Poll::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.polls.index'));
@@ -62,8 +77,8 @@ test('index returns an ok response', function (): void {
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $poll = \App\Models\Poll::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $poll = Poll::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.polls.show', [$poll]));
@@ -76,16 +91,16 @@ test('show returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\PollController::class,
+ PollController::class,
'store',
- \App\Http\Requests\StorePoll::class
+ StorePoll::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.polls.store'), [
// TODO: send request data
@@ -98,17 +113,17 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\PollController::class,
+ PollController::class,
'update',
- \App\Http\Requests\UpdatePollRequest::class
+ UpdatePollRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $poll = \App\Models\Poll::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $poll = Poll::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.polls.update', [$poll]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/RegionControllerTest.php b/tests/Feature/Http/Controllers/Staff/RegionControllerTest.php
index cc75d1148..9f32ac5d5 100644
--- a/tests/Feature/Http/Controllers/Staff/RegionControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/RegionControllerTest.php
@@ -1,11 +1,27 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\RegionController;
+use App\Http\Requests\Staff\DestroyRegionRequest;
+use App\Http\Requests\Staff\StoreRegionRequest;
+use App\Http\Requests\Staff\UpdateRegionRequest;
+use App\Models\Region;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.regions.create'));
@@ -17,17 +33,17 @@ test('create returns an ok response', function (): void {
test('destroy validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\RegionController::class,
+ RegionController::class,
'destroy',
- \App\Http\Requests\Staff\DestroyRegionRequest::class
+ DestroyRegionRequest::class
);
});
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $region = \App\Models\Region::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $region = Region::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.regions.destroy', [$region]));
@@ -40,8 +56,8 @@ test('destroy returns an ok response', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $region = \App\Models\Region::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $region = Region::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.regions.edit', [$region]));
@@ -55,8 +71,8 @@ test('edit returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $regions = \App\Models\Region::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $regions = Region::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.regions.index'));
@@ -69,16 +85,16 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\RegionController::class,
+ RegionController::class,
'store',
- \App\Http\Requests\Staff\StoreRegionRequest::class
+ StoreRegionRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.regions.store'), [
// TODO: send request data
@@ -91,17 +107,17 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\RegionController::class,
+ RegionController::class,
'update',
- \App\Http\Requests\Staff\UpdateRegionRequest::class
+ UpdateRegionRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $region = \App\Models\Region::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $region = Region::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.regions.update', [$region]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/ReportControllerTest.php b/tests/Feature/Http/Controllers/Staff/ReportControllerTest.php
index 977c4585f..770668d7a 100644
--- a/tests/Feature/Http/Controllers/Staff/ReportControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/ReportControllerTest.php
@@ -1,12 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\ReportController;
+use App\Http\Requests\Staff\UpdateReportRequest;
+use App\Models\Report;
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $reports = \App\Models\Report::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $reports = Report::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.reports.index'));
@@ -20,8 +34,8 @@ test('index returns an ok response', function (): void {
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $report = \App\Models\Report::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $report = Report::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.reports.show', [$report]));
@@ -35,17 +49,17 @@ test('show returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\ReportController::class,
+ ReportController::class,
'update',
- \App\Http\Requests\Staff\UpdateReportRequest::class
+ UpdateReportRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $report = \App\Models\Report::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $report = Report::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.reports.update', [$report]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/ResolutionControllerTest.php b/tests/Feature/Http/Controllers/Staff/ResolutionControllerTest.php
index 070e7ac6b..a763512c6 100644
--- a/tests/Feature/Http/Controllers/Staff/ResolutionControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/ResolutionControllerTest.php
@@ -1,11 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\ResolutionController;
+use App\Http\Requests\Staff\StoreResolutionRequest;
+use App\Http\Requests\Staff\UpdateResolutionRequest;
+use App\Models\Resolution;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.resolutions.create'));
@@ -18,8 +33,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $resolution = \App\Models\Resolution::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $resolution = Resolution::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.resolutions.destroy', [$resolution]));
@@ -32,8 +47,8 @@ test('destroy returns an ok response', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $resolution = \App\Models\Resolution::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $resolution = Resolution::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.resolutions.edit', [$resolution]));
@@ -47,8 +62,8 @@ test('edit returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $resolutions = \App\Models\Resolution::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $resolutions = Resolution::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.resolutions.index'));
@@ -61,16 +76,16 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\ResolutionController::class,
+ ResolutionController::class,
'store',
- \App\Http\Requests\Staff\StoreResolutionRequest::class
+ StoreResolutionRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.resolutions.store'), [
// TODO: send request data
@@ -83,17 +98,17 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\ResolutionController::class,
+ ResolutionController::class,
'update',
- \App\Http\Requests\Staff\UpdateResolutionRequest::class
+ UpdateResolutionRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $resolution = \App\Models\Resolution::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $resolution = Resolution::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.resolutions.update', [$resolution]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/RssControllerTest.php b/tests/Feature/Http/Controllers/Staff/RssControllerTest.php
index 5d3027e6c..f8a4b98bc 100644
--- a/tests/Feature/Http/Controllers/Staff/RssControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/RssControllerTest.php
@@ -1,15 +1,34 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\RssController;
+use App\Http\Requests\Staff\StoreRssRequest;
+use App\Http\Requests\Staff\UpdateRssRequest;
+use App\Models\Category;
+use App\Models\Genre;
+use App\Models\Resolution;
+use App\Models\Rss;
+use App\Models\Type;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $categories = \App\Models\Category::factory()->times(3)->create();
- $types = \App\Models\Type::factory()->times(3)->create();
- $resolutions = \App\Models\Resolution::factory()->times(3)->create();
- $genres = \App\Models\Genre::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $categories = Category::factory()->times(3)->create();
+ $types = Type::factory()->times(3)->create();
+ $resolutions = Resolution::factory()->times(3)->create();
+ $genres = Genre::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.rss.create'));
@@ -27,8 +46,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $rss = \App\Models\Rss::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $rss = Rss::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.rss.destroy', [$rss]));
@@ -41,8 +60,8 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $rss = \App\Models\Rss::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $rss = Rss::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_if(403)`...
@@ -54,12 +73,12 @@ test('destroy aborts with a 403', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $rss = \App\Models\Rss::factory()->create();
- $categories = \App\Models\Category::factory()->times(3)->create();
- $types = \App\Models\Type::factory()->times(3)->create();
- $resolutions = \App\Models\Resolution::factory()->times(3)->create();
- $genres = \App\Models\Genre::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $rss = Rss::factory()->create();
+ $categories = Category::factory()->times(3)->create();
+ $types = Type::factory()->times(3)->create();
+ $resolutions = Resolution::factory()->times(3)->create();
+ $genres = Genre::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.rss.edit', [$rss]));
@@ -78,12 +97,12 @@ test('edit returns an ok response', function (): void {
test('edit aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $rss = \App\Models\Rss::factory()->create();
- $categories = \App\Models\Category::factory()->times(3)->create();
- $types = \App\Models\Type::factory()->times(3)->create();
- $resolutions = \App\Models\Resolution::factory()->times(3)->create();
- $genres = \App\Models\Genre::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $rss = Rss::factory()->create();
+ $categories = Category::factory()->times(3)->create();
+ $types = Type::factory()->times(3)->create();
+ $resolutions = Resolution::factory()->times(3)->create();
+ $genres = Genre::factory()->times(3)->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_if(403)`...
@@ -95,8 +114,8 @@ test('edit aborts with a 403', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $rsses = \App\Models\Rss::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $rsses = Rss::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.rss.index'));
@@ -109,16 +128,16 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\RssController::class,
+ RssController::class,
'store',
- \App\Http\Requests\Staff\StoreRssRequest::class
+ StoreRssRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.rss.store'), [
// TODO: send request data
@@ -131,17 +150,17 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\RssController::class,
+ RssController::class,
'update',
- \App\Http\Requests\Staff\UpdateRssRequest::class
+ UpdateRssRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $rss = \App\Models\Rss::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $rss = Rss::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.rss.update', [$rss]), [
// TODO: send request data
@@ -155,8 +174,8 @@ test('update returns an ok response', function (): void {
test('update aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $rss = \App\Models\Rss::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $rss = Rss::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_if(403)`...
diff --git a/tests/Feature/Http/Controllers/Staff/SeedboxControllerTest.php b/tests/Feature/Http/Controllers/Staff/SeedboxControllerTest.php
index c30c198ab..e52ab5d1b 100644
--- a/tests/Feature/Http/Controllers/Staff/SeedboxControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/SeedboxControllerTest.php
@@ -1,12 +1,24 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Seedbox;
+use App\Models\User;
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $seedbox = \App\Models\Seedbox::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $seedbox = Seedbox::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.seedboxes.destroy', [$seedbox]));
@@ -19,8 +31,8 @@ test('destroy returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $seedboxes = \App\Models\Seedbox::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $seedboxes = Seedbox::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.seedboxes.index'));
diff --git a/tests/Feature/Http/Controllers/Staff/TypeControllerTest.php b/tests/Feature/Http/Controllers/Staff/TypeControllerTest.php
index 9f33d7e6b..f1e7af7ca 100644
--- a/tests/Feature/Http/Controllers/Staff/TypeControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/TypeControllerTest.php
@@ -2,6 +2,8 @@
namespace Tests\Feature\Http\Controllers\Staff;
+use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
use PHPUnit\Framework\Attributes\Test;
use App\Models\Group;
use App\Models\Type;
@@ -19,7 +21,7 @@ final class TypeControllerTest extends TestCase
parent::setUp();
}
- protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model
+ protected function createStaffUser(): Collection|Model
{
return User::factory()->create([
'group_id' => fn () => Group::factory()->create([
diff --git a/tests/Feature/Http/Controllers/Staff/TypeControllerTest.shift.php b/tests/Feature/Http/Controllers/Staff/TypeControllerTest.shift.php
index 11be9176a..66e8d0804 100644
--- a/tests/Feature/Http/Controllers/Staff/TypeControllerTest.shift.php
+++ b/tests/Feature/Http/Controllers/Staff/TypeControllerTest.shift.php
@@ -1,11 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\TypeController;
+use App\Http\Requests\Staff\StoreTypeRequest;
+use App\Http\Requests\Staff\UpdateTypeRequest;
+use App\Models\Type;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.types.create'));
@@ -18,8 +33,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $type = \App\Models\Type::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $type = Type::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.types.destroy', [$type]));
@@ -32,8 +47,8 @@ test('destroy returns an ok response', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $type = \App\Models\Type::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $type = Type::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.types.edit', [$type]));
@@ -47,8 +62,8 @@ test('edit returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $types = \App\Models\Type::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $types = Type::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.types.index'));
@@ -61,16 +76,16 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\TypeController::class,
+ TypeController::class,
'store',
- \App\Http\Requests\Staff\StoreTypeRequest::class
+ StoreTypeRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.types.store'), [
// TODO: send request data
@@ -83,17 +98,17 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\TypeController::class,
+ TypeController::class,
'update',
- \App\Http\Requests\Staff\UpdateTypeRequest::class
+ UpdateTypeRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $type = \App\Models\Type::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $type = Type::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('staff.types.update', [$type]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Staff/UnbanControllerTest.php b/tests/Feature/Http/Controllers/Staff/UnbanControllerTest.php
index c01a3128e..38ab6308d 100644
--- a/tests/Feature/Http/Controllers/Staff/UnbanControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/UnbanControllerTest.php
@@ -1,20 +1,33 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\UnbanController;
+use App\Http\Requests\Staff\StoreUnbanRequest;
+use App\Models\User;
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\UnbanController::class,
+ UnbanController::class,
'store',
- \App\Http\Requests\Staff\StoreUnbanRequest::class
+ StoreUnbanRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post(route('staff.unbans.store'), [
// TODO: send request data
@@ -28,8 +41,8 @@ test('store returns an ok response', function (): void {
test('store aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_if(403)`...
diff --git a/tests/Feature/Http/Controllers/Staff/UserControllerTest.php b/tests/Feature/Http/Controllers/Staff/UserControllerTest.php
index 846fa6a57..92b02ec2d 100644
--- a/tests/Feature/Http/Controllers/Staff/UserControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/UserControllerTest.php
@@ -1,14 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\UserController;
+use App\Http\Requests\Staff\UpdateUserRequest;
+use App\Models\Group;
+use App\Models\Internal;
+use App\Models\User;
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $groups = \App\Models\Group::factory()->times(3)->create();
- $internals = \App\Models\Internal::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $groups = Group::factory()->times(3)->create();
+ $internals = Internal::factory()->times(3)->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('staff.users.edit', [$user]));
@@ -24,7 +39,7 @@ test('edit returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.users.index'));
@@ -37,8 +52,8 @@ test('index returns an ok response', function (): void {
test('permissions returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->patch(route('staff.users.update_permissions', [$user]), [
// TODO: send request data
@@ -51,18 +66,18 @@ test('permissions returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\UserController::class,
+ UserController::class,
'update',
- \App\Http\Requests\Staff\UpdateUserRequest::class
+ UpdateUserRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $group = \App\Models\Group::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $group = Group::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->patch(route('staff.users.update', [$user]), [
// TODO: send request data
@@ -76,9 +91,9 @@ test('update returns an ok response', function (): void {
test('update aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $group = \App\Models\Group::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $group = Group::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_if(403)`...
diff --git a/tests/Feature/Http/Controllers/Staff/VersionControllerTest.php b/tests/Feature/Http/Controllers/Staff/VersionControllerTest.php
index 8591bafc6..c7354bd61 100644
--- a/tests/Feature/Http/Controllers/Staff/VersionControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/VersionControllerTest.php
@@ -1,11 +1,22 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('check version returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.'));
diff --git a/tests/Feature/Http/Controllers/Staff/WarningControllerTest.php b/tests/Feature/Http/Controllers/Staff/WarningControllerTest.php
index 73e389d4e..95b92b27b 100644
--- a/tests/Feature/Http/Controllers/Staff/WarningControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/WarningControllerTest.php
@@ -1,11 +1,22 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.warnings.index'));
diff --git a/tests/Feature/Http/Controllers/Staff/WatchlistControllerTest.php b/tests/Feature/Http/Controllers/Staff/WatchlistControllerTest.php
index d60dd3edf..3597719ab 100644
--- a/tests/Feature/Http/Controllers/Staff/WatchlistControllerTest.php
+++ b/tests/Feature/Http/Controllers/Staff/WatchlistControllerTest.php
@@ -1,12 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\Staff\WatchlistController;
+use App\Http\Requests\Staff\StoreWatchedUserRequest;
+use App\Models\User;
+use App\Models\Watchlist;
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $watchlist = \App\Models\Watchlist::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $watchlist = Watchlist::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('staff.watchlist.destroy', [$watchlist]));
@@ -19,7 +33,7 @@ test('destroy returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('staff.watchlist.index'));
@@ -31,16 +45,16 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\Staff\WatchlistController::class,
+ WatchlistController::class,
'store',
- \App\Http\Requests\Staff\StoreWatchedUserRequest::class
+ StoreWatchedUserRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('staff.watchlist.store'), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/StatsControllerTest.php b/tests/Feature/Http/Controllers/StatsControllerTest.php
index ae4a8e339..73f86ac25 100644
--- a/tests/Feature/Http/Controllers/StatsControllerTest.php
+++ b/tests/Feature/Http/Controllers/StatsControllerTest.php
@@ -1,12 +1,28 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Category;
+use App\Models\Group;
+use App\Models\Peer;
+use App\Models\Torrent;
+use App\Models\TorrentRequest;
+use App\Models\User;
test('bankers returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $users = \App\Models\User::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $users = User::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('bankers'));
@@ -20,8 +36,8 @@ test('bankers returns an ok response', function (): void {
test('bountied returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrentRequests = \App\Models\TorrentRequest::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $torrentRequests = TorrentRequest::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('bountied'));
@@ -35,7 +51,7 @@ test('bountied returns an ok response', function (): void {
test('clients returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('clients'));
@@ -49,8 +65,8 @@ test('clients returns an ok response', function (): void {
test('completed returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrents = \App\Models\Torrent::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $torrents = Torrent::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('completed'));
@@ -64,8 +80,8 @@ test('completed returns an ok response', function (): void {
test('dead returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrents = \App\Models\Torrent::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $torrents = Torrent::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('dead'));
@@ -79,8 +95,8 @@ test('dead returns an ok response', function (): void {
test('downloaded returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $users = \App\Models\User::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $users = User::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('downloaded'));
@@ -94,8 +110,8 @@ test('downloaded returns an ok response', function (): void {
test('dying returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrents = \App\Models\Torrent::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $torrents = Torrent::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('dying'));
@@ -109,9 +125,9 @@ test('dying returns an ok response', function (): void {
test('group returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $group = \App\Models\Group::factory()->create();
- $users = \App\Models\User::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $group = Group::factory()->create();
+ $users = User::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('group', ['id' => $id]));
@@ -126,8 +142,8 @@ test('group returns an ok response', function (): void {
test('groups returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $groups = \App\Models\Group::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $groups = Group::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('groups'));
@@ -141,8 +157,8 @@ test('groups returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $categories = \App\Models\Category::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $categories = Category::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('stats'));
@@ -174,7 +190,7 @@ test('index returns an ok response', function (): void {
test('languages returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('languages'));
@@ -188,8 +204,8 @@ test('languages returns an ok response', function (): void {
test('leeched returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrents = \App\Models\Torrent::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $torrents = Torrent::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('leeched'));
@@ -203,8 +219,8 @@ test('leeched returns an ok response', function (): void {
test('leechers returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $peers = \App\Models\Peer::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $peers = Peer::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('leechers'));
@@ -218,8 +234,8 @@ test('leechers returns an ok response', function (): void {
test('seeded returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrents = \App\Models\Torrent::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $torrents = Torrent::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('seeded'));
@@ -233,8 +249,8 @@ test('seeded returns an ok response', function (): void {
test('seeders returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $peers = \App\Models\Peer::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $peers = Peer::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('seeders'));
@@ -248,8 +264,8 @@ test('seeders returns an ok response', function (): void {
test('seedsize returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $users = \App\Models\User::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $users = User::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('seedsize'));
@@ -263,8 +279,8 @@ test('seedsize returns an ok response', function (): void {
test('seedtime returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $users = \App\Models\User::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $users = User::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('seedtime'));
@@ -278,8 +294,8 @@ test('seedtime returns an ok response', function (): void {
test('themes returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $users = \App\Models\User::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $users = User::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('themes'));
@@ -295,8 +311,8 @@ test('themes returns an ok response', function (): void {
test('uploaded returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $users = \App\Models\User::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $users = User::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('uploaded'));
@@ -310,8 +326,8 @@ test('uploaded returns an ok response', function (): void {
test('uploaders returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrents = \App\Models\Torrent::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $torrents = Torrent::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('uploaders'));
diff --git a/tests/Feature/Http/Controllers/SubscriptionControllerTest.php b/tests/Feature/Http/Controllers/SubscriptionControllerTest.php
index aee1d76d5..8e524c2e4 100644
--- a/tests/Feature/Http/Controllers/SubscriptionControllerTest.php
+++ b/tests/Feature/Http/Controllers/SubscriptionControllerTest.php
@@ -1,12 +1,24 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Subscription;
+use App\Models\User;
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $subscription = \App\Models\Subscription::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $subscription = Subscription::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('subscriptions.destroy', ['id' => $subscription->id]), [
// TODO: send request data
@@ -20,8 +32,8 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $subscription = \App\Models\Subscription::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $subscription = Subscription::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -35,7 +47,7 @@ test('destroy aborts with a 403', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('subscriptions.index'));
@@ -49,7 +61,7 @@ test('index returns an ok response', function (): void {
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('subscriptions.store'), [
// TODO: send request data
@@ -63,21 +75,7 @@ test('store returns an ok response', function (): void {
test('store aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
-
- // TODO: perform additional setup to trigger `abort_unless(403)`...
-
- $response = $this->actingAs($user)->post(route('subscriptions.store'), [
- // TODO: send request data
- ]);
-
- $response->assertForbidden();
-});
-
-test('store aborts with a 403', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/SubtitleControllerTest.php b/tests/Feature/Http/Controllers/SubtitleControllerTest.php
index 19fc8c9a6..e794bc25c 100644
--- a/tests/Feature/Http/Controllers/SubtitleControllerTest.php
+++ b/tests/Feature/Http/Controllers/SubtitleControllerTest.php
@@ -1,13 +1,30 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\SubtitleController;
+use App\Http\Requests\StoreSubtitleRequest;
+use App\Http\Requests\UpdateSubtitleRequest;
+use App\Models\MediaLanguage;
+use App\Models\Subtitle;
+use App\Models\Torrent;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $mediaLanguages = \App\Models\MediaLanguage::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $mediaLanguages = MediaLanguage::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('subtitles.create'));
@@ -22,8 +39,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $subtitle = \App\Models\Subtitle::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $subtitle = Subtitle::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('subtitles.destroy', [$subtitle]));
@@ -36,8 +53,8 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $subtitle = \App\Models\Subtitle::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $subtitle = Subtitle::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -49,8 +66,8 @@ test('destroy aborts with a 403', function (): void {
test('download returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $subtitle = \App\Models\Subtitle::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $subtitle = Subtitle::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('subtitles.download', [$subtitle]));
@@ -62,7 +79,7 @@ test('download returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('subtitles.index'));
@@ -74,17 +91,17 @@ test('index returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\SubtitleController::class,
+ SubtitleController::class,
'store',
- \App\Http\Requests\StoreSubtitleRequest::class
+ StoreSubtitleRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('subtitles.store'), [
// TODO: send request data
@@ -97,17 +114,17 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\SubtitleController::class,
+ SubtitleController::class,
'update',
- \App\Http\Requests\UpdateSubtitleRequest::class
+ UpdateSubtitleRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $subtitle = \App\Models\Subtitle::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $subtitle = Subtitle::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('subtitles.update', [$subtitle]), [
// TODO: send request data
@@ -121,8 +138,8 @@ test('update returns an ok response', function (): void {
test('update aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $subtitle = \App\Models\Subtitle::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $subtitle = Subtitle::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/TicketAssigneeControllerTest.php b/tests/Feature/Http/Controllers/TicketAssigneeControllerTest.php
index 4e5cd8d1a..17e4bf17c 100644
--- a/tests/Feature/Http/Controllers/TicketAssigneeControllerTest.php
+++ b/tests/Feature/Http/Controllers/TicketAssigneeControllerTest.php
@@ -1,12 +1,24 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Ticket;
+use App\Models\User;
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $ticket = \App\Models\Ticket::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $ticket = Ticket::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('tickets.assignee.destroy', [$ticket]));
@@ -19,8 +31,8 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $ticket = \App\Models\Ticket::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $ticket = Ticket::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -32,8 +44,8 @@ test('destroy aborts with a 403', function (): void {
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $ticket = \App\Models\Ticket::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $ticket = Ticket::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('tickets.assignee.store', [$ticket]), [
// TODO: send request data
@@ -47,8 +59,8 @@ test('store returns an ok response', function (): void {
test('store aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $ticket = \App\Models\Ticket::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $ticket = Ticket::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/TicketAttachmentControllerTest.php b/tests/Feature/Http/Controllers/TicketAttachmentControllerTest.php
index 380bb2989..6cf15bd9e 100644
--- a/tests/Feature/Http/Controllers/TicketAttachmentControllerTest.php
+++ b/tests/Feature/Http/Controllers/TicketAttachmentControllerTest.php
@@ -1,15 +1,31 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Ticket;
+use App\Models\TicketAttachment;
+use App\Models\User;
test('download returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $ticket = \App\Models\Ticket::factory()->create();
- $ticketAttachment = \App\Models\TicketAttachment::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $ticket = Ticket::factory()->create();
+ $ticketAttachment = TicketAttachment::factory()->create();
+ $user = User::factory()->create();
- $response = $this->actingAs($user)->post(route('tickets.attachment.download', [$ticket, 'attachment' => $ticketAttachment->attachment]), [
+ $response = $this->actingAs($user)->post(route(
+ 'tickets.attachment.download',
+ [$ticket, 'attachment' => $ticketAttachment->attachment]
+ ), [
// TODO: send request data
]);
@@ -21,13 +37,16 @@ test('download returns an ok response', function (): void {
test('download aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $ticket = \App\Models\Ticket::factory()->create();
- $ticketAttachment = \App\Models\TicketAttachment::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $ticket = Ticket::factory()->create();
+ $ticketAttachment = TicketAttachment::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
- $response = $this->actingAs($user)->post(route('tickets.attachment.download', [$ticket, 'attachment' => $ticketAttachment->attachment]), [
+ $response = $this->actingAs($user)->post(route(
+ 'tickets.attachment.download',
+ [$ticket, 'attachment' => $ticketAttachment->attachment]
+ ), [
// TODO: send request data
]);
diff --git a/tests/Feature/Http/Controllers/TicketControllerTest.php b/tests/Feature/Http/Controllers/TicketControllerTest.php
index c80fc7a31..847a4e492 100644
--- a/tests/Feature/Http/Controllers/TicketControllerTest.php
+++ b/tests/Feature/Http/Controllers/TicketControllerTest.php
@@ -1,12 +1,28 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\TicketController;
+use App\Http\Requests\StoreTicketRequest;
+use App\Models\Ticket;
+use App\Models\TicketCategory;
+use App\Models\TicketPriority;
+use App\Models\User;
test('close returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $ticket = \App\Models\Ticket::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $ticket = Ticket::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('tickets.close', [$ticket]), [
// TODO: send request data
@@ -20,8 +36,8 @@ test('close returns an ok response', function (): void {
test('close aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $ticket = \App\Models\Ticket::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $ticket = Ticket::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -35,9 +51,9 @@ test('close aborts with a 403', function (): void {
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $ticketCategories = \App\Models\TicketCategory::factory()->times(3)->create();
- $ticketPriorities = \App\Models\TicketPriority::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $ticketCategories = TicketCategory::factory()->times(3)->create();
+ $ticketPriorities = TicketPriority::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('tickets.create'));
@@ -52,8 +68,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $ticket = \App\Models\Ticket::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $ticket = Ticket::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('tickets.destroy', [$ticket]));
@@ -66,8 +82,8 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $ticket = \App\Models\Ticket::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $ticket = Ticket::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -79,7 +95,7 @@ test('destroy aborts with a 403', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('tickets.index'));
@@ -92,8 +108,8 @@ test('index returns an ok response', function (): void {
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $ticket = \App\Models\Ticket::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $ticket = Ticket::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('tickets.show', [$ticket]));
@@ -108,8 +124,8 @@ test('show returns an ok response', function (): void {
test('show aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $ticket = \App\Models\Ticket::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $ticket = Ticket::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -120,16 +136,16 @@ test('show aborts with a 403', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\TicketController::class,
+ TicketController::class,
'store',
- \App\Http\Requests\StoreTicketRequest::class
+ StoreTicketRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('tickets.store'), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/Top10ControllerTest.php b/tests/Feature/Http/Controllers/Top10ControllerTest.php
index 04c44311d..bb8ec8c84 100644
--- a/tests/Feature/Http/Controllers/Top10ControllerTest.php
+++ b/tests/Feature/Http/Controllers/Top10ControllerTest.php
@@ -1,11 +1,22 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('top10.index'));
diff --git a/tests/Feature/Http/Controllers/TopicControllerTest.php b/tests/Feature/Http/Controllers/TopicControllerTest.php
index 367a3db47..8e6513ce7 100644
--- a/tests/Feature/Http/Controllers/TopicControllerTest.php
+++ b/tests/Feature/Http/Controllers/TopicControllerTest.php
@@ -1,12 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Forum;
+use App\Models\Subscription;
+use App\Models\Topic;
+use App\Models\User;
test('close returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $topic = \App\Models\Topic::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $topic = Topic::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.close', ['id' => $topic->id]), [
// TODO: send request data
@@ -20,9 +34,9 @@ test('close returns an ok response', function (): void {
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $forum = \App\Models\Forum::factory()->create();
- $topic = \App\Models\Topic::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $forum = Forum::factory()->create();
+ $topic = Topic::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('topics.create', ['id' => $topic->id]));
@@ -36,8 +50,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $topic = \App\Models\Topic::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $topic = Topic::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('topics.destroy', ['id' => $topic->id]));
@@ -50,9 +64,9 @@ test('destroy returns an ok response', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $topic = \App\Models\Topic::factory()->create();
- $forums = \App\Models\Forum::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $topic = Topic::factory()->create();
+ $forums = Forum::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('topics.edit', ['id' => $topic->id]));
@@ -67,9 +81,9 @@ test('edit returns an ok response', function (): void {
test('edit aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $topic = \App\Models\Topic::factory()->create();
- $forums = \App\Models\Forum::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $topic = Topic::factory()->create();
+ $forums = Forum::factory()->times(3)->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -81,7 +95,7 @@ test('edit aborts with a 403', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('topics.index'));
@@ -94,8 +108,8 @@ test('index returns an ok response', function (): void {
test('open returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $topic = \App\Models\Topic::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $topic = Topic::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.open', ['id' => $topic->id]), [
// TODO: send request data
@@ -109,8 +123,8 @@ test('open returns an ok response', function (): void {
test('pin returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $topic = \App\Models\Topic::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $topic = Topic::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.pin', ['id' => $topic->id]), [
// TODO: send request data
@@ -124,9 +138,9 @@ test('pin returns an ok response', function (): void {
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $topic = \App\Models\Topic::factory()->create();
- $subscription = \App\Models\Subscription::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $topic = Topic::factory()->create();
+ $subscription = Subscription::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('topics.show', ['id' => $topic->id]));
@@ -142,9 +156,9 @@ test('show returns an ok response', function (): void {
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $forum = \App\Models\Forum::factory()->create();
- $topic = \App\Models\Topic::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $forum = Forum::factory()->create();
+ $topic = Topic::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.store', ['id' => $topic->id]), [
// TODO: send request data
@@ -158,8 +172,8 @@ test('store returns an ok response', function (): void {
test('unpin returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $topic = \App\Models\Topic::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $topic = Topic::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.unpin', ['id' => $topic->id]), [
// TODO: send request data
@@ -173,8 +187,8 @@ test('unpin returns an ok response', function (): void {
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $topic = \App\Models\Topic::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $topic = Topic::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('topics.update', ['id' => $topic->id]), [
// TODO: send request data
@@ -188,8 +202,8 @@ test('update returns an ok response', function (): void {
test('update aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $topic = \App\Models\Topic::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $topic = Topic::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/TopicLabelControllerTest.php b/tests/Feature/Http/Controllers/TopicLabelControllerTest.php
index 5e2f4e5a4..a06c633e2 100644
--- a/tests/Feature/Http/Controllers/TopicLabelControllerTest.php
+++ b/tests/Feature/Http/Controllers/TopicLabelControllerTest.php
@@ -1,12 +1,24 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Topic;
+use App\Models\User;
test('approve returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $topic = \App\Models\Topic::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $topic = Topic::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.approve', ['id' => $id]), [
// TODO: send request data
@@ -20,8 +32,8 @@ test('approve returns an ok response', function (): void {
test('bug returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $topic = \App\Models\Topic::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $topic = Topic::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.bug', ['id' => $id]), [
// TODO: send request data
@@ -35,8 +47,8 @@ test('bug returns an ok response', function (): void {
test('deny returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $topic = \App\Models\Topic::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $topic = Topic::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.deny', ['id' => $id]), [
// TODO: send request data
@@ -50,8 +62,8 @@ test('deny returns an ok response', function (): void {
test('implement returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $topic = \App\Models\Topic::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $topic = Topic::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.implement', ['id' => $id]), [
// TODO: send request data
@@ -65,8 +77,8 @@ test('implement returns an ok response', function (): void {
test('invalid returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $topic = \App\Models\Topic::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $topic = Topic::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.invalid', ['id' => $id]), [
// TODO: send request data
@@ -80,8 +92,8 @@ test('invalid returns an ok response', function (): void {
test('solve returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $topic = \App\Models\Topic::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $topic = Topic::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.solve', ['id' => $id]), [
// TODO: send request data
@@ -95,8 +107,8 @@ test('solve returns an ok response', function (): void {
test('suggest returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $topic = \App\Models\Topic::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $topic = Topic::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('topics.suggest', ['id' => $id]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/TorrentBuffControllerTest.php b/tests/Feature/Http/Controllers/TorrentBuffControllerTest.php
index d7948c14b..b3ca0ba64 100644
--- a/tests/Feature/Http/Controllers/TorrentBuffControllerTest.php
+++ b/tests/Feature/Http/Controllers/TorrentBuffControllerTest.php
@@ -1,12 +1,24 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Torrent;
+use App\Models\User;
test('bump torrent returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('bumpTorrent', ['id' => $id]), [
// TODO: send request data
@@ -20,8 +32,8 @@ test('bump torrent returns an ok response', function (): void {
test('bump torrent aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -35,8 +47,8 @@ test('bump torrent aborts with a 403', function (): void {
test('freeleech token returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('freeleech_token', ['id' => $id]), [
// TODO: send request data
@@ -50,8 +62,8 @@ test('freeleech token returns an ok response', function (): void {
test('grant double up returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('torrent_doubleup', ['id' => $id]), [
// TODO: send request data
@@ -65,8 +77,8 @@ test('grant double up returns an ok response', function (): void {
test('grant double up aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -80,8 +92,8 @@ test('grant double up aborts with a 403', function (): void {
test('grant f l returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('torrent_fl', ['id' => $id]), [
// TODO: send request data
@@ -95,8 +107,8 @@ test('grant f l returns an ok response', function (): void {
test('grant f l aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -110,8 +122,8 @@ test('grant f l aborts with a 403', function (): void {
test('grant featured returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('torrent_feature', ['id' => $id]), [
// TODO: send request data
@@ -125,8 +137,8 @@ test('grant featured returns an ok response', function (): void {
test('grant featured aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -140,8 +152,8 @@ test('grant featured aborts with a 403', function (): void {
test('revoke featured returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('torrent_revokefeature', ['id' => $id]), [
// TODO: send request data
@@ -155,8 +167,8 @@ test('revoke featured returns an ok response', function (): void {
test('revoke featured aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -170,8 +182,8 @@ test('revoke featured aborts with a 403', function (): void {
test('set refundable returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('refundable', ['id' => $id]), [
// TODO: send request data
@@ -185,8 +197,8 @@ test('set refundable returns an ok response', function (): void {
test('set refundable aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -200,8 +212,8 @@ test('set refundable aborts with a 403', function (): void {
test('sticky returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('torrent_sticky', ['id' => $id]), [
// TODO: send request data
@@ -215,8 +227,8 @@ test('sticky returns an ok response', function (): void {
test('sticky aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/TorrentControllerTest.php b/tests/Feature/Http/Controllers/TorrentControllerTest.php
index db15e538e..f7219335a 100644
--- a/tests/Feature/Http/Controllers/TorrentControllerTest.php
+++ b/tests/Feature/Http/Controllers/TorrentControllerTest.php
@@ -1,16 +1,41 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\TorrentController;
+use App\Http\Requests\StoreTorrentRequest;
+use App\Http\Requests\UpdateTorrentRequest;
+use App\Models\Audit;
+use App\Models\Category;
+use App\Models\Distributor;
+use App\Models\FeaturedTorrent;
+use App\Models\History;
+use App\Models\Movie;
+use App\Models\Region;
+use App\Models\Resolution;
+use App\Models\Torrent;
+use App\Models\Tv;
+use App\Models\Type;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $categories = \App\Models\Category::factory()->times(3)->create();
- $types = \App\Models\Type::factory()->times(3)->create();
- $resolutions = \App\Models\Resolution::factory()->times(3)->create();
- $regions = \App\Models\Region::factory()->times(3)->create();
- $distributors = \App\Models\Distributor::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $categories = Category::factory()->times(3)->create();
+ $types = Type::factory()->times(3)->create();
+ $resolutions = Resolution::factory()->times(3)->create();
+ $regions = Region::factory()->times(3)->create();
+ $distributors = Distributor::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('torrents.create'));
@@ -36,8 +61,8 @@ test('create returns an ok response', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->delete(route('torrents.destroy', ['id' => $torrent->id]));
@@ -50,8 +75,8 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -63,13 +88,13 @@ test('destroy aborts with a 403', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $categories = \App\Models\Category::factory()->times(3)->create();
- $types = \App\Models\Type::factory()->times(3)->create();
- $resolutions = \App\Models\Resolution::factory()->times(3)->create();
- $regions = \App\Models\Region::factory()->times(3)->create();
- $distributors = \App\Models\Distributor::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $categories = Category::factory()->times(3)->create();
+ $types = Type::factory()->times(3)->create();
+ $resolutions = Resolution::factory()->times(3)->create();
+ $regions = Region::factory()->times(3)->create();
+ $distributors = Distributor::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('torrents.edit', ['id' => $torrent->id]));
@@ -90,13 +115,13 @@ test('edit returns an ok response', function (): void {
test('edit aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $categories = \App\Models\Category::factory()->times(3)->create();
- $types = \App\Models\Type::factory()->times(3)->create();
- $resolutions = \App\Models\Resolution::factory()->times(3)->create();
- $regions = \App\Models\Region::factory()->times(3)->create();
- $distributors = \App\Models\Distributor::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $categories = Category::factory()->times(3)->create();
+ $types = Type::factory()->times(3)->create();
+ $resolutions = Resolution::factory()->times(3)->create();
+ $regions = Region::factory()->times(3)->create();
+ $distributors = Distributor::factory()->times(3)->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -108,7 +133,7 @@ test('edit aborts with a 403', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('torrents.index'));
@@ -121,13 +146,13 @@ test('index returns an ok response', function (): void {
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $tv = \App\Models\Tv::factory()->create();
- $movie = \App\Models\Movie::factory()->create();
- $featuredTorrent = \App\Models\FeaturedTorrent::factory()->create();
- $history = \App\Models\History::factory()->create();
- $audits = \App\Models\Audit::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $tv = Tv::factory()->create();
+ $movie = Movie::factory()->create();
+ $featuredTorrent = FeaturedTorrent::factory()->create();
+ $history = History::factory()->create();
+ $audits = Audit::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('torrents.show', ['id' => $torrent->id]));
@@ -153,17 +178,17 @@ test('show returns an ok response', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\TorrentController::class,
+ TorrentController::class,
'store',
- \App\Http\Requests\StoreTorrentRequest::class
+ StoreTorrentRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $category = \App\Models\Category::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $category = Category::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->post(route('torrents.store'), [
// TODO: send request data
@@ -176,17 +201,17 @@ test('store returns an ok response', function (): void {
test('update validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\TorrentController::class,
+ TorrentController::class,
'update',
- \App\Http\Requests\UpdateTorrentRequest::class
+ UpdateTorrentRequest::class
);
});
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->patch(route('torrents.update', ['id' => $torrent->id]), [
// TODO: send request data
@@ -200,8 +225,8 @@ test('update returns an ok response', function (): void {
test('update aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $user = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/TorrentDownloadControllerTest.php b/tests/Feature/Http/Controllers/TorrentDownloadControllerTest.php
index 3a43710c5..c1a744444 100644
--- a/tests/Feature/Http/Controllers/TorrentDownloadControllerTest.php
+++ b/tests/Feature/Http/Controllers/TorrentDownloadControllerTest.php
@@ -1,13 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Torrent;
+use App\Models\TorrentDownload;
+use App\Models\User;
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $torrentDownload = \App\Models\TorrentDownload::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $torrentDownload = TorrentDownload::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('download_check', ['id' => $torrentDownload->id]));
@@ -22,9 +35,9 @@ test('show returns an ok response', function (): void {
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $torrentDownload = \App\Models\TorrentDownload::factory()->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $torrentDownload = TorrentDownload::factory()->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('download', ['id' => $torrentDownload->id]));
diff --git a/tests/Feature/Http/Controllers/TorrentHistoryControllerTest.php b/tests/Feature/Http/Controllers/TorrentHistoryControllerTest.php
index 2165e6fb4..b090e737b 100644
--- a/tests/Feature/Http/Controllers/TorrentHistoryControllerTest.php
+++ b/tests/Feature/Http/Controllers/TorrentHistoryControllerTest.php
@@ -1,13 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\History;
+use App\Models\Torrent;
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $histories = \App\Models\History::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $histories = History::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('history', ['id' => $id]));
diff --git a/tests/Feature/Http/Controllers/TorrentPeerControllerTest.php b/tests/Feature/Http/Controllers/TorrentPeerControllerTest.php
index 6a2d1e0e2..4ff755744 100644
--- a/tests/Feature/Http/Controllers/TorrentPeerControllerTest.php
+++ b/tests/Feature/Http/Controllers/TorrentPeerControllerTest.php
@@ -1,13 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Peer;
+use App\Models\Torrent;
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $torrent = \App\Models\Torrent::factory()->create();
- $peers = \App\Models\Peer::factory()->times(3)->create();
- $user = \App\Models\User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $peers = Peer::factory()->times(3)->create();
+ $user = User::factory()->create();
$response = $this->actingAs($user)->get(route('peers', ['id' => $id]));
diff --git a/tests/Feature/Http/Controllers/User/AchievementsControllerTest.php b/tests/Feature/Http/Controllers/User/AchievementsControllerTest.php
index 1ae307037..03554cead 100644
--- a/tests/Feature/Http/Controllers/User/AchievementsControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/AchievementsControllerTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.achievements.index', [$user]));
diff --git a/tests/Feature/Http/Controllers/User/ApikeyControllerTest.php b/tests/Feature/Http/Controllers/User/ApikeyControllerTest.php
index 86ec8fe12..8cf322d6d 100644
--- a/tests/Feature/Http/Controllers/User/ApikeyControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/ApikeyControllerTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.apikey.edit', [$user]));
@@ -20,8 +31,8 @@ test('edit returns an ok response', function (): void {
test('edit aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/EarningControllerTest.php b/tests/Feature/Http/Controllers/User/EarningControllerTest.php
index 8ac9bee55..691d61e0b 100644
--- a/tests/Feature/Http/Controllers/User/EarningControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/EarningControllerTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.earnings.index', [$user]));
@@ -33,8 +44,8 @@ test('index returns an ok response', function (): void {
test('index aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/EmailControllerTest.php b/tests/Feature/Http/Controllers/User/EmailControllerTest.php
index 7c3d6d36d..cebe83fae 100644
--- a/tests/Feature/Http/Controllers/User/EmailControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/EmailControllerTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.email.edit', [$user]));
@@ -20,8 +31,8 @@ test('edit returns an ok response', function (): void {
test('edit aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/FollowControllerTest.php b/tests/Feature/Http/Controllers/User/FollowControllerTest.php
index 59a0033c6..6feb4fb92 100644
--- a/tests/Feature/Http/Controllers/User/FollowControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/FollowControllerTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->delete(route('users.followers.destroy', [$user]));
@@ -19,8 +30,8 @@ test('destroy returns an ok response', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.followers.index', [$user]));
@@ -35,8 +46,8 @@ test('index returns an ok response', function (): void {
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post(route('users.followers.store', [$user]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/User/FollowingControllerTest.php b/tests/Feature/Http/Controllers/User/FollowingControllerTest.php
index f4c9d3507..1f3177185 100644
--- a/tests/Feature/Http/Controllers/User/FollowingControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/FollowingControllerTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.following.index', [$user]));
diff --git a/tests/Feature/Http/Controllers/User/GeneralSettingControllerTest.php b/tests/Feature/Http/Controllers/User/GeneralSettingControllerTest.php
index 2cb24e46d..2d6d59d2a 100644
--- a/tests/Feature/Http/Controllers/User/GeneralSettingControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/GeneralSettingControllerTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.general_settings.edit', [$user]));
@@ -20,8 +31,8 @@ test('edit returns an ok response', function (): void {
test('edit aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -33,8 +44,8 @@ test('edit aborts with a 403', function (): void {
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->patch(route('users.general_settings.update', [$user]), [
// TODO: send request data
@@ -48,8 +59,8 @@ test('update returns an ok response', function (): void {
test('update aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/GiftControllerTest.php b/tests/Feature/Http/Controllers/User/GiftControllerTest.php
index afafb620b..008bb9bd8 100644
--- a/tests/Feature/Http/Controllers/User/GiftControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/GiftControllerTest.php
@@ -1,12 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\User\GiftController;
+use App\Http\Requests\StoreGiftRequest;
+use App\Models\BonTransactions;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.gifts.create', [$user]));
@@ -21,8 +35,8 @@ test('create returns an ok response', function (): void {
test('create aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -34,9 +48,9 @@ test('create aborts with a 403', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $bonTransactions = \App\Models\BonTransactions::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $bonTransactions = BonTransactions::factory()->times(3)->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.gifts.index', [$user]));
@@ -54,9 +68,9 @@ test('index returns an ok response', function (): void {
test('index aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $bonTransactions = \App\Models\BonTransactions::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $bonTransactions = BonTransactions::factory()->times(3)->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -67,17 +81,17 @@ test('index aborts with a 403', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\User\GiftController::class,
+ GiftController::class,
'store',
- \App\Http\Requests\StoreGiftRequest::class
+ StoreGiftRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post(route('users.gifts.store', [$user]), [
// TODO: send request data
diff --git a/tests/Feature/Http/Controllers/User/HistoryControllerTest.php b/tests/Feature/Http/Controllers/User/HistoryControllerTest.php
index a359e9e26..40122465a 100644
--- a/tests/Feature/Http/Controllers/User/HistoryControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/HistoryControllerTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.history.index', [$user]));
@@ -21,8 +32,8 @@ test('index returns an ok response', function (): void {
test('index aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/InviteControllerTest.php b/tests/Feature/Http/Controllers/User/InviteControllerTest.php
index 3f3f1d6f8..622ca7dab 100644
--- a/tests/Feature/Http/Controllers/User/InviteControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/InviteControllerTest.php
@@ -1,12 +1,24 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Invite;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.invites.create', [$user]));
@@ -20,8 +32,8 @@ test('create returns an ok response', function (): void {
test('create aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -33,9 +45,9 @@ test('create aborts with a 403', function (): void {
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $invite = \App\Models\Invite::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $invite = Invite::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->delete(route('users.invites.destroy', [$user, $invite]));
@@ -48,9 +60,9 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $invite = \App\Models\Invite::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $invite = Invite::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -62,8 +74,8 @@ test('destroy aborts with a 403', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.invites.index', [$user]));
@@ -78,8 +90,8 @@ test('index returns an ok response', function (): void {
test('index aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -91,9 +103,9 @@ test('index aborts with a 403', function (): void {
test('send returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $invite = \App\Models\Invite::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $invite = Invite::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post(route('users.invites.send', [$user, $invite]), [
// TODO: send request data
@@ -107,9 +119,9 @@ test('send returns an ok response', function (): void {
test('send aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $invite = \App\Models\Invite::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $invite = Invite::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -123,8 +135,8 @@ test('send aborts with a 403', function (): void {
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post(route('users.invites.store', [$user]), [
// TODO: send request data
@@ -138,8 +150,8 @@ test('store returns an ok response', function (): void {
test('store aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/NotificationControllerTest.php b/tests/Feature/Http/Controllers/User/NotificationControllerTest.php
index 010bcbc1e..614e41720 100644
--- a/tests/Feature/Http/Controllers/User/NotificationControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/NotificationControllerTest.php
@@ -1,13 +1,24 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$notification = \App\Models\Notification::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->delete(route('users.notifications.destroy', [$user, $notification]));
@@ -20,9 +31,9 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$notification = \App\Models\Notification::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -34,8 +45,8 @@ test('destroy aborts with a 403', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.notifications.index', [$user]));
@@ -48,8 +59,8 @@ test('index returns an ok response', function (): void {
test('index aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -61,8 +72,8 @@ test('index aborts with a 403', function (): void {
test('mass destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->delete(route('users.notifications.mass_destroy', [$user]));
@@ -74,8 +85,8 @@ test('mass destroy returns an ok response', function (): void {
test('mass destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -87,8 +98,8 @@ test('mass destroy aborts with a 403', function (): void {
test('mass update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->patch(route('users.notifications.mass_update', [$user]), [
// TODO: send request data
@@ -102,8 +113,8 @@ test('mass update returns an ok response', function (): void {
test('mass update aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -117,9 +128,9 @@ test('mass update aborts with a 403', function (): void {
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$notification = \App\Models\Notification::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.notifications.show', [$user, $notification]));
@@ -131,9 +142,9 @@ test('show returns an ok response', function (): void {
test('show aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$notification = \App\Models\Notification::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -145,9 +156,9 @@ test('show aborts with a 403', function (): void {
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$notification = \App\Models\Notification::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->patch(route('users.notifications.update', [$user, $notification]), [
// TODO: send request data
@@ -161,9 +172,9 @@ test('update returns an ok response', function (): void {
test('update aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
$notification = \App\Models\Notification::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/NotificationSettingControllerTest.php b/tests/Feature/Http/Controllers/User/NotificationSettingControllerTest.php
index cdfeae6a1..a0768df30 100644
--- a/tests/Feature/Http/Controllers/User/NotificationSettingControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/NotificationSettingControllerTest.php
@@ -1,13 +1,25 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Group;
+use App\Models\User;
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $groups = \App\Models\Group::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $groups = Group::factory()->times(3)->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.notification_settings.edit', [$user]));
@@ -22,9 +34,9 @@ test('edit returns an ok response', function (): void {
test('edit aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $groups = \App\Models\Group::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $groups = Group::factory()->times(3)->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -36,8 +48,8 @@ test('edit aborts with a 403', function (): void {
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->patch(route('users.notification_settings.update', [$user]), [
// TODO: send request data
@@ -51,8 +63,8 @@ test('update returns an ok response', function (): void {
test('update aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/PasskeyControllerTest.php b/tests/Feature/Http/Controllers/User/PasskeyControllerTest.php
index f4bcf8a35..cabe3031e 100644
--- a/tests/Feature/Http/Controllers/User/PasskeyControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/PasskeyControllerTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.passkey.edit', [$user]));
@@ -20,8 +31,8 @@ test('edit returns an ok response', function (): void {
test('edit aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/PasswordControllerTest.php b/tests/Feature/Http/Controllers/User/PasswordControllerTest.php
index a32b8b407..2f664e82d 100644
--- a/tests/Feature/Http/Controllers/User/PasswordControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/PasswordControllerTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.password.edit', [$user]));
@@ -20,8 +31,8 @@ test('edit returns an ok response', function (): void {
test('edit aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/PeerControllerTest.php b/tests/Feature/Http/Controllers/User/PeerControllerTest.php
index 7b6d0bd3e..2f8ae7369 100644
--- a/tests/Feature/Http/Controllers/User/PeerControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/PeerControllerTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.peers.index', [$user]));
@@ -21,8 +32,8 @@ test('index returns an ok response', function (): void {
test('index aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -34,8 +45,8 @@ test('index aborts with a 403', function (): void {
test('mass destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->delete(route('users.peers.mass_destroy', [$user]));
@@ -47,8 +58,8 @@ test('mass destroy returns an ok response', function (): void {
test('mass destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/PostControllerTest.php b/tests/Feature/Http/Controllers/User/PostControllerTest.php
index 24e3b3b97..89cdb50a1 100644
--- a/tests/Feature/Http/Controllers/User/PostControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/PostControllerTest.php
@@ -1,13 +1,25 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Topic;
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $topics = \App\Models\Topic::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $topics = Topic::factory()->times(3)->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.posts.index', [$user]));
diff --git a/tests/Feature/Http/Controllers/User/PrivacySettingControllerTest.php b/tests/Feature/Http/Controllers/User/PrivacySettingControllerTest.php
index 6f71a73b2..4bc9ba7cb 100644
--- a/tests/Feature/Http/Controllers/User/PrivacySettingControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/PrivacySettingControllerTest.php
@@ -1,13 +1,25 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Group;
+use App\Models\User;
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $groups = \App\Models\Group::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $groups = Group::factory()->times(3)->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.privacy_settings.edit', [$user]));
@@ -22,9 +34,9 @@ test('edit returns an ok response', function (): void {
test('edit aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $groups = \App\Models\Group::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $groups = Group::factory()->times(3)->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -36,8 +48,8 @@ test('edit aborts with a 403', function (): void {
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->patch(route('users.privacy_settings.update', [$user]), [
// TODO: send request data
@@ -51,8 +63,8 @@ test('update returns an ok response', function (): void {
test('update aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/ReceivedPrivateMessageControllerTest.php b/tests/Feature/Http/Controllers/User/ReceivedPrivateMessageControllerTest.php
index b2398a61e..86ad60855 100644
--- a/tests/Feature/Http/Controllers/User/ReceivedPrivateMessageControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/ReceivedPrivateMessageControllerTest.php
@@ -1,15 +1,30 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\PrivateMessage;
+use App\Models\User;
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $privateMessage = \App\Models\PrivateMessage::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $privateMessage = PrivateMessage::factory()->create();
+ $authUser = User::factory()->create();
- $response = $this->actingAs($authUser)->delete(route('users.received_messages.destroy', [$user, 'receivedPrivateMessage' => $receivedPrivateMessage]));
+ $response = $this->actingAs($authUser)->delete(route(
+ 'users.received_messages.destroy',
+ [$user, 'receivedPrivateMessage' => $receivedPrivateMessage]
+ ));
$response->assertOk();
$this->assertModelMissing($receivedPrivateMessage);
@@ -20,13 +35,16 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $privateMessage = \App\Models\PrivateMessage::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $privateMessage = PrivateMessage::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
- $response = $this->actingAs($authUser)->delete(route('users.received_messages.destroy', [$user, 'receivedPrivateMessage' => $receivedPrivateMessage]));
+ $response = $this->actingAs($authUser)->delete(route(
+ 'users.received_messages.destroy',
+ [$user, 'receivedPrivateMessage' => $receivedPrivateMessage]
+ ));
$response->assertForbidden();
});
@@ -34,8 +52,8 @@ test('destroy aborts with a 403', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.received_messages.index', [$user]));
@@ -51,8 +69,8 @@ test('index returns an ok response', function (): void {
test('index aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -64,8 +82,8 @@ test('index aborts with a 403', function (): void {
test('mass destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->delete(route('users.received_messages.mass_destroy', [$user]));
@@ -77,8 +95,8 @@ test('mass destroy returns an ok response', function (): void {
test('mass destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -90,8 +108,8 @@ test('mass destroy aborts with a 403', function (): void {
test('mass update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post(route('users.received_messages.mass_update', [$user]), [
// TODO: send request data
@@ -105,8 +123,8 @@ test('mass update returns an ok response', function (): void {
test('mass update aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -120,11 +138,14 @@ test('mass update aborts with a 403', function (): void {
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $privateMessage = \App\Models\PrivateMessage::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $privateMessage = PrivateMessage::factory()->create();
+ $authUser = User::factory()->create();
- $response = $this->actingAs($authUser)->get(route('users.received_messages.show', [$user, 'receivedPrivateMessage' => $receivedPrivateMessage]));
+ $response = $this->actingAs($authUser)->get(route(
+ 'users.received_messages.show',
+ [$user, 'receivedPrivateMessage' => $receivedPrivateMessage]
+ ));
$response->assertOk();
$response->assertViewIs('user.received-private-message.show');
@@ -137,13 +158,16 @@ test('show returns an ok response', function (): void {
test('show aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $privateMessage = \App\Models\PrivateMessage::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $privateMessage = PrivateMessage::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
- $response = $this->actingAs($authUser)->get(route('users.received_messages.show', [$user, 'receivedPrivateMessage' => $receivedPrivateMessage]));
+ $response = $this->actingAs($authUser)->get(route(
+ 'users.received_messages.show',
+ [$user, 'receivedPrivateMessage' => $receivedPrivateMessage]
+ ));
$response->assertForbidden();
});
@@ -151,11 +175,14 @@ test('show aborts with a 403', function (): void {
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $privateMessage = \App\Models\PrivateMessage::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $privateMessage = PrivateMessage::factory()->create();
+ $authUser = User::factory()->create();
- $response = $this->actingAs($authUser)->patch(route('users.received_messages.update', [$user, 'receivedPrivateMessage' => $receivedPrivateMessage]), [
+ $response = $this->actingAs($authUser)->patch(route(
+ 'users.received_messages.update',
+ [$user, 'receivedPrivateMessage' => $receivedPrivateMessage]
+ ), [
// TODO: send request data
]);
@@ -167,13 +194,16 @@ test('update returns an ok response', function (): void {
test('update aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $privateMessage = \App\Models\PrivateMessage::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $privateMessage = PrivateMessage::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
- $response = $this->actingAs($authUser)->patch(route('users.received_messages.update', [$user, 'receivedPrivateMessage' => $receivedPrivateMessage]), [
+ $response = $this->actingAs($authUser)->patch(route(
+ 'users.received_messages.update',
+ [$user, 'receivedPrivateMessage' => $receivedPrivateMessage]
+ ), [
// TODO: send request data
]);
diff --git a/tests/Feature/Http/Controllers/User/ResurrectionControllerTest.php b/tests/Feature/Http/Controllers/User/ResurrectionControllerTest.php
index bbac94480..3a52f8ad2 100644
--- a/tests/Feature/Http/Controllers/User/ResurrectionControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/ResurrectionControllerTest.php
@@ -1,15 +1,31 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Graveyard;
+use App\Models\Torrent;
+use App\Models\User;
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $graveyard = \App\Models\Graveyard::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $graveyard = Graveyard::factory()->create();
+ $authUser = User::factory()->create();
- $response = $this->actingAs($authUser)->delete(route('users.resurrections.destroy', [$user, 'resurrection' => $resurrection]));
+ $response = $this->actingAs($authUser)->delete(route(
+ 'users.resurrections.destroy',
+ [$user, 'resurrection' => $resurrection]
+ ));
$response->assertOk();
$this->assertModelMissing($resurrection);
@@ -20,13 +36,16 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $graveyard = \App\Models\Graveyard::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $graveyard = Graveyard::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
- $response = $this->actingAs($authUser)->delete(route('users.resurrections.destroy', [$user, 'resurrection' => $resurrection]));
+ $response = $this->actingAs($authUser)->delete(route(
+ 'users.resurrections.destroy',
+ [$user, 'resurrection' => $resurrection]
+ ));
$response->assertForbidden();
});
@@ -34,8 +53,8 @@ test('destroy aborts with a 403', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.resurrections.index', [$user]));
@@ -49,8 +68,8 @@ test('index returns an ok response', function (): void {
test('index aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -62,9 +81,9 @@ test('index aborts with a 403', function (): void {
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $torrent = \App\Models\Torrent::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post(route('users.resurrections.store', [$user]), [
// TODO: send request data
@@ -78,9 +97,9 @@ test('store returns an ok response', function (): void {
test('store aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $torrent = \App\Models\Torrent::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/RsskeyControllerTest.php b/tests/Feature/Http/Controllers/User/RsskeyControllerTest.php
index d015b14b4..2b0d4e517 100644
--- a/tests/Feature/Http/Controllers/User/RsskeyControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/RsskeyControllerTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.rsskey.edit', [$user]));
@@ -20,8 +31,8 @@ test('edit returns an ok response', function (): void {
test('edit aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/SeedboxControllerTest.php b/tests/Feature/Http/Controllers/User/SeedboxControllerTest.php
index 9884e77db..c4ea20b04 100644
--- a/tests/Feature/Http/Controllers/User/SeedboxControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/SeedboxControllerTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.seedboxes.index', [$user]));
@@ -21,8 +32,8 @@ test('index returns an ok response', function (): void {
test('index aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/SentPrivateMessageControllerTest.php b/tests/Feature/Http/Controllers/User/SentPrivateMessageControllerTest.php
index 57411be2c..d35156051 100644
--- a/tests/Feature/Http/Controllers/User/SentPrivateMessageControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/SentPrivateMessageControllerTest.php
@@ -1,12 +1,24 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\PrivateMessage;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.sent_messages.create', [$user]));
@@ -21,8 +33,8 @@ test('create returns an ok response', function (): void {
test('create aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -34,8 +46,8 @@ test('create aborts with a 403', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.sent_messages.index', [$user]));
@@ -51,8 +63,8 @@ test('index returns an ok response', function (): void {
test('index aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -64,11 +76,14 @@ test('index aborts with a 403', function (): void {
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $privateMessage = \App\Models\PrivateMessage::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $privateMessage = PrivateMessage::factory()->create();
+ $authUser = User::factory()->create();
- $response = $this->actingAs($authUser)->get(route('users.sent_messages.show', [$user, 'sentPrivateMessage' => $sentPrivateMessage]));
+ $response = $this->actingAs($authUser)->get(route(
+ 'users.sent_messages.show',
+ [$user, 'sentPrivateMessage' => $sentPrivateMessage]
+ ));
$response->assertOk();
$response->assertViewIs('user.sent-private-message.show');
@@ -81,13 +96,16 @@ test('show returns an ok response', function (): void {
test('show aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $privateMessage = \App\Models\PrivateMessage::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $privateMessage = PrivateMessage::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
- $response = $this->actingAs($authUser)->get(route('users.sent_messages.show', [$user, 'sentPrivateMessage' => $sentPrivateMessage]));
+ $response = $this->actingAs($authUser)->get(route(
+ 'users.sent_messages.show',
+ [$user, 'sentPrivateMessage' => $sentPrivateMessage]
+ ));
$response->assertForbidden();
});
@@ -95,8 +113,8 @@ test('show aborts with a 403', function (): void {
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post(route('users.sent_messages.store', [$user]), [
// TODO: send request data
@@ -110,8 +128,8 @@ test('store returns an ok response', function (): void {
test('store aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -125,11 +143,14 @@ test('store aborts with a 403', function (): void {
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $privateMessage = \App\Models\PrivateMessage::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $privateMessage = PrivateMessage::factory()->create();
+ $authUser = User::factory()->create();
- $response = $this->actingAs($authUser)->patch(route('users.sent_messages.update', [$user, 'sentPrivateMessage' => $sentPrivateMessage]), [
+ $response = $this->actingAs($authUser)->patch(route(
+ 'users.sent_messages.update',
+ [$user, 'sentPrivateMessage' => $sentPrivateMessage]
+ ), [
// TODO: send request data
]);
@@ -141,13 +162,16 @@ test('update returns an ok response', function (): void {
test('update aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $privateMessage = \App\Models\PrivateMessage::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $privateMessage = PrivateMessage::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
- $response = $this->actingAs($authUser)->patch(route('users.sent_messages.update', [$user, 'sentPrivateMessage' => $sentPrivateMessage]), [
+ $response = $this->actingAs($authUser)->patch(route(
+ 'users.sent_messages.update',
+ [$user, 'sentPrivateMessage' => $sentPrivateMessage]
+ ), [
// TODO: send request data
]);
diff --git a/tests/Feature/Http/Controllers/User/TipControllerTest.php b/tests/Feature/Http/Controllers/User/TipControllerTest.php
index b0ec539c9..f08f637c4 100644
--- a/tests/Feature/Http/Controllers/User/TipControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/TipControllerTest.php
@@ -1,13 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\User\TipController;
+use App\Http\Requests\StoreTipRequest;
+use App\Models\BonTransactions;
+use App\Models\Post;
+use App\Models\Torrent;
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $bonTransactions = \App\Models\BonTransactions::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $bonTransactions = BonTransactions::factory()->times(3)->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.tips.index', [$user]));
@@ -25,9 +41,9 @@ test('index returns an ok response', function (): void {
test('index aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $bonTransactions = \App\Models\BonTransactions::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $bonTransactions = BonTransactions::factory()->times(3)->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -38,19 +54,19 @@ test('index aborts with a 403', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\User\TipController::class,
+ TipController::class,
'store',
- \App\Http\Requests\StoreTipRequest::class
+ StoreTipRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $torrent = \App\Models\Torrent::factory()->create();
- $post = \App\Models\Post::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $post = Post::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post(route('users.tips.store', [$user]), [
// TODO: send request data
@@ -64,10 +80,10 @@ test('store returns an ok response', function (): void {
test('store aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $torrent = \App\Models\Torrent::factory()->create();
- $post = \App\Models\Post::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $post = Post::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/TopicControllerTest.php b/tests/Feature/Http/Controllers/User/TopicControllerTest.php
index c29a66b17..bde43da09 100644
--- a/tests/Feature/Http/Controllers/User/TopicControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/TopicControllerTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.topics.index', [$user]));
diff --git a/tests/Feature/Http/Controllers/User/TorrentControllerTest.php b/tests/Feature/Http/Controllers/User/TorrentControllerTest.php
index 8e72ec61d..a66e2cb2e 100644
--- a/tests/Feature/Http/Controllers/User/TorrentControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/TorrentControllerTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.torrents.index', [$user]));
@@ -21,8 +32,8 @@ test('index returns an ok response', function (): void {
test('index aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/TorrentZipControllerTest.php b/tests/Feature/Http/Controllers/User/TorrentZipControllerTest.php
index 134f2ea98..23471f1d4 100644
--- a/tests/Feature/Http/Controllers/User/TorrentZipControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/TorrentZipControllerTest.php
@@ -1,13 +1,25 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Torrent;
+use App\Models\User;
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $torrents = \App\Models\Torrent::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $torrents = Torrent::factory()->times(3)->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.torrent_zip.show', [$user]));
@@ -19,9 +31,9 @@ test('show returns an ok response', function (): void {
test('show aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $torrents = \App\Models\Torrent::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $torrents = Torrent::factory()->times(3)->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/TransactionControllerTest.php b/tests/Feature/Http/Controllers/User/TransactionControllerTest.php
index 90aa5b512..030bab6b7 100644
--- a/tests/Feature/Http/Controllers/User/TransactionControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/TransactionControllerTest.php
@@ -1,13 +1,27 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Http\Controllers\User\TransactionController;
+use App\Http\Requests\StoreTransactionRequest;
+use App\Models\BonExchange;
+use App\Models\User;
test('create returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $bonExchanges = \App\Models\BonExchange::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $bonExchanges = BonExchange::factory()->times(3)->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.transactions.create', [$user]));
@@ -24,9 +38,9 @@ test('create returns an ok response', function (): void {
test('create aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $bonExchanges = \App\Models\BonExchange::factory()->times(3)->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $bonExchanges = BonExchange::factory()->times(3)->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -37,18 +51,18 @@ test('create aborts with a 403', function (): void {
test('store validates with a form request', function (): void {
$this->assertActionUsesFormRequest(
- \App\Http\Controllers\User\TransactionController::class,
+ TransactionController::class,
'store',
- \App\Http\Requests\StoreTransactionRequest::class
+ StoreTransactionRequest::class
);
});
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $bonExchange = \App\Models\BonExchange::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $bonExchange = BonExchange::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post(route('users.transactions.store', [$user]), [
// TODO: send request data
@@ -62,9 +76,9 @@ test('store returns an ok response', function (): void {
test('store aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $bonExchange = \App\Models\BonExchange::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $bonExchange = BonExchange::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/TwoStepControllerTest.php b/tests/Feature/Http/Controllers/User/TwoStepControllerTest.php
index 156d67e95..84ab363c3 100644
--- a/tests/Feature/Http/Controllers/User/TwoStepControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/TwoStepControllerTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.two_step.edit', [$user]));
@@ -20,8 +31,8 @@ test('edit returns an ok response', function (): void {
test('edit aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/UserControllerTest.php b/tests/Feature/Http/Controllers/User/UserControllerTest.php
index 38c57a120..8a0b34570 100644
--- a/tests/Feature/Http/Controllers/User/UserControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/UserControllerTest.php
@@ -1,12 +1,25 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Invite;
+use App\Models\Peer;
+use App\Models\User;
test('accept rules returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post(route('users.accept.rules', [$user]), [
// TODO: send request data
@@ -20,8 +33,8 @@ test('accept rules returns an ok response', function (): void {
test('accept rules aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -35,8 +48,8 @@ test('accept rules aborts with a 403', function (): void {
test('edit returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.edit', [$user]));
@@ -50,8 +63,8 @@ test('edit returns an ok response', function (): void {
test('edit aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -63,10 +76,10 @@ test('edit aborts with a 403', function (): void {
test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $invite = \App\Models\Invite::factory()->create();
- $peer = \App\Models\Peer::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $invite = Invite::factory()->create();
+ $peer = Peer::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.show', [$user]));
@@ -91,8 +104,8 @@ test('show returns an ok response', function (): void {
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->patch(route('users.update', [$user]), [
// TODO: send request data
@@ -106,8 +119,8 @@ test('update returns an ok response', function (): void {
test('update aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/WarningControllerTest.php b/tests/Feature/Http/Controllers/User/WarningControllerTest.php
index 26a313b15..8a2116727 100644
--- a/tests/Feature/Http/Controllers/User/WarningControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/WarningControllerTest.php
@@ -1,13 +1,25 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\User;
+use App\Models\Warning;
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $warning = \App\Models\Warning::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $warning = Warning::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->delete(route('users.warnings.destroy', [$user, $warning]));
@@ -20,9 +32,9 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $warning = \App\Models\Warning::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $warning = Warning::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -34,8 +46,8 @@ test('destroy aborts with a 403', function (): void {
test('mass destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->delete(route('users.warnings.mass_destroy', [$user]));
@@ -47,8 +59,8 @@ test('mass destroy returns an ok response', function (): void {
test('mass destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -60,9 +72,9 @@ test('mass destroy aborts with a 403', function (): void {
test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $warning = \App\Models\Warning::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $warning = Warning::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->patch(route('users.warnings.update', [$user, $warning]), [
// TODO: send request data
@@ -76,9 +88,9 @@ test('update returns an ok response', function (): void {
test('update aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $warning = \App\Models\Warning::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $warning = Warning::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/User/WishControllerTest.php b/tests/Feature/Http/Controllers/User/WishControllerTest.php
index fbcb2f13d..4009a066e 100644
--- a/tests/Feature/Http/Controllers/User/WishControllerTest.php
+++ b/tests/Feature/Http/Controllers/User/WishControllerTest.php
@@ -1,13 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
-uses(RefreshDatabase::class);
+use App\Models\Torrent;
+use App\Models\User;
+use App\Models\Wish;
test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $wish = \App\Models\Wish::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $wish = Wish::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->delete(route('users.wishes.destroy', [$user, $wish]));
@@ -20,9 +33,9 @@ test('destroy returns an ok response', function (): void {
test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $wish = \App\Models\Wish::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $wish = Wish::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -34,8 +47,8 @@ test('destroy aborts with a 403', function (): void {
test('index returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.wishes.index', [$user]));
@@ -51,8 +64,8 @@ test('index returns an ok response', function (): void {
test('index aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -64,10 +77,10 @@ test('index aborts with a 403', function (): void {
test('store returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $torrent = \App\Models\Torrent::factory()->create();
- $wish = \App\Models\Wish::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $wish = Wish::factory()->create();
+ $authUser = User::factory()->create();
$response = $this->actingAs($authUser)->post(route('users.wishes.store', [$user]), [
// TODO: send request data
@@ -81,10 +94,10 @@ test('store returns an ok response', function (): void {
test('store aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
- $user = \App\Models\User::factory()->create();
- $torrent = \App\Models\Torrent::factory()->create();
- $wish = \App\Models\Wish::factory()->create();
- $authUser = \App\Models\User::factory()->create();
+ $user = User::factory()->create();
+ $torrent = Torrent::factory()->create();
+ $wish = Wish::factory()->create();
+ $authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
diff --git a/tests/Feature/Http/Controllers/AchievementsControllerTest.php b/tests/Old/AchievementsControllerTest.php
similarity index 94%
rename from tests/Feature/Http/Controllers/AchievementsControllerTest.php
rename to tests/Old/AchievementsControllerTest.php
index d05790fd8..f2c024418 100644
--- a/tests/Feature/Http/Controllers/AchievementsControllerTest.php
+++ b/tests/Old/AchievementsControllerTest.php
@@ -1,10 +1,10 @@
seed(GroupsTableSeeder::class);
+
+ $activation = UserActivation::factory()->create();
+
+ $this->get(route('activate', ['token' => $activation->token]))
+ ->assertRedirect(route('login'))
+ ->assertSessionHas('success', trans('auth.activation-success'));
+ }
+}
diff --git a/tests/Old/AnnounceControllerTest.php b/tests/Old/AnnounceControllerTest.php
new file mode 100644
index 000000000..166589e36
--- /dev/null
+++ b/tests/Old/AnnounceControllerTest.php
@@ -0,0 +1,54 @@
+seed(GroupsTableSeeder::class);
+
+ $user = User::factory()->create([
+ 'can_download' => true,
+ ]);
+
+ $info_hash = '16679042096019090177'; // 20 bytes
+ $peer_id = '19045931013802080695'; // 20 bytes
+
+ Torrent::factory()->create([
+ 'info_hash' => $info_hash,
+ 'status' => Torrent::APPROVED,
+ ]);
+
+ $headers = [
+ 'accept-language' => null,
+ 'referer' => null,
+ 'accept-charset' => null,
+ 'want-digest' => null,
+ ];
+
+ $response = $this->withHeaders($headers)->get(route('announce', [
+ 'passkey' => $user->passkey,
+ 'info_hash' => $info_hash,
+ 'peer_id' => $peer_id,
+ 'port' => 7022,
+ 'left' => 0,
+ 'uploaded' => 1,
+ 'downloaded' => 1,
+ 'compact' => 1,
+ ]))
+ ->assertOk();
+
+ $this->assertArrayNotHasKey('failure reason', [$response->getContent()]);
+ }
+}
diff --git a/tests/Old/ApplicationControllerTest.php b/tests/Old/ApplicationControllerTest.php
new file mode 100644
index 000000000..02d8d7c76
--- /dev/null
+++ b/tests/Old/ApplicationControllerTest.php
@@ -0,0 +1,37 @@
+get(route('application.create'))
+ ->assertOk()
+ ->assertViewIs('auth.application.create');
+ }
+
+ #[Test]
+ public function store_returns_an_ok_response(): void
+ {
+ config(['captcha.enabled' => false]);
+
+ $application = Application::factory()->make();
+
+ $this->post(route('application.store'), [
+ 'type' => $application->type,
+ 'email' => $application->email,
+ 'referrer' => $application->referrer,
+ ])
+ ->assertRedirect(route('login'))
+ ->assertSessionHas('success', trans('auth.application-submitted'));
+ }
+}
diff --git a/tests/Old/ArticleControllerTest.php b/tests/Old/ArticleControllerTest.php
new file mode 100644
index 000000000..d5f7f03a7
--- /dev/null
+++ b/tests/Old/ArticleControllerTest.php
@@ -0,0 +1,44 @@
+seed(GroupsTableSeeder::class);
+
+ $user = User::factory()->create();
+
+ $response = $this->actingAs($user)->get(route('articles.index'));
+
+ $response->assertOk();
+ $response->assertViewIs('article.index');
+ $response->assertViewHas('articles');
+ }
+
+ #[Test]
+ public function show_returns_an_ok_response(): void
+ {
+ $this->seed(GroupsTableSeeder::class);
+
+ $article = Article::factory()->create();
+ $user = User::factory()->create();
+
+ $response = $this->actingAs($user)->get(route('articles.show', ['article' => $article]));
+
+ $response->assertOk();
+ $response->assertViewIs('article.show');
+ $response->assertViewHas('article');
+ }
+}
diff --git a/tests/Old/ContactControllerTest.php b/tests/Old/ContactControllerTest.php
new file mode 100644
index 000000000..7609ec284
--- /dev/null
+++ b/tests/Old/ContactControllerTest.php
@@ -0,0 +1,47 @@
+seed(UsersTableSeeder::class);
+ $this->seed(GroupsTableSeeder::class);
+
+ $user = User::factory()->create();
+
+ $response = $this->actingAs($user)->get(route('contact.index'));
+
+ $response->assertOk()
+ ->assertViewIs('contact.index');
+ }
+
+ #[Test]
+ public function store_returns_an_ok_response(): void
+ {
+ $this->seed(UsersTableSeeder::class);
+ $this->seed(GroupsTableSeeder::class);
+
+ $user = User::factory()->create();
+
+ $response = $this->actingAs($user)->post(route('contact.store'), [
+ 'email' => 'foo@bar.com',
+ 'contact-name' => 'Foo Bar',
+ 'message' => 'Hello, world!',
+ ]);
+
+ $response->assertRedirect(route('home.index'))
+ ->assertSessionHas('success', 'Your Message Was Successfully Sent');
+ }
+}
diff --git a/tests/Feature/Http/Controllers/FollowControllerTest.php b/tests/Old/FollowControllerTest.php
similarity index 97%
rename from tests/Feature/Http/Controllers/FollowControllerTest.php
rename to tests/Old/FollowControllerTest.php
index 95c93a4f9..01d68f531 100644
--- a/tests/Feature/Http/Controllers/FollowControllerTest.php
+++ b/tests/Old/FollowControllerTest.php
@@ -1,11 +1,11 @@
false]);
+
+ $user = User::factory()->create();
+
+ $this->post(route('username.email'), [
+ 'email' => $user->email,
+ ])
+ ->assertRedirect(route('login'))
+ ->assertSessionHas('success', trans('email.username-sent'));
+ }
+
+ #[Test]
+ public function show_forgot_username_form_returns_an_ok_response(): void
+ {
+ $this->get(route('username.request'))
+ ->assertOk()
+ ->assertViewIs('auth.username');
+ }
+}
diff --git a/tests/Old/ForumControllerTest.php b/tests/Old/ForumControllerTest.php
new file mode 100644
index 000000000..6f5ba39d1
--- /dev/null
+++ b/tests/Old/ForumControllerTest.php
@@ -0,0 +1,105 @@
+seed(UsersTableSeeder::class);
+ $this->seed(GroupsTableSeeder::class);
+
+ $user = User::factory()->create();
+
+ $this->actingAs($user)->get(route('forums.index'))
+ ->assertOk()
+ ->assertViewIs('forum.index')
+ ->assertViewHas('categories')
+ ->assertViewHas('num_posts')
+ ->assertViewHas('num_forums')
+ ->assertViewHas('num_topics');
+ }
+
+ #[Test]
+ public function latest_posts_returns_an_ok_response(): void
+ {
+ $this->seed(UsersTableSeeder::class);
+ $this->seed(GroupsTableSeeder::class);
+
+ $user = User::factory()->create();
+
+ $this->actingAs($user)->get(route('posts.index'))
+ ->assertOk()
+ ->assertViewIs('forum.post.index')
+ ->assertSeeLivewire(PostSearch::class);
+ }
+
+ #[Test]
+ public function latest_topics_returns_an_ok_response(): void
+ {
+ $this->seed(UsersTableSeeder::class);
+ $this->seed(GroupsTableSeeder::class);
+
+ $user = User::factory()->create();
+
+ $this->actingAs($user)->get(route('topics.index'))
+ ->assertOk()
+ ->assertViewIs('forum.topic.index')
+ ->assertSeeLivewire(TopicSearch::class);
+ }
+
+ #[Test]
+ public function show_forum_returns_an_ok_response(): void
+ {
+ $this->seed(UsersTableSeeder::class);
+ $this->seed(GroupsTableSeeder::class);
+
+ $user = User::factory()->create();
+
+ // This Forum does not have a parent, which makes it a proper Forum
+ // (and not a "Forum Category").
+
+ $forum = Forum::factory()->create([
+ 'parent_id' => 0,
+ 'last_post_user_id' => $user->id,
+ 'last_post_user_username' => $user->username,
+ ]);
+
+ $permissions = Permission::factory()->create([
+ 'forum_id' => $forum->id,
+ 'show_forum' => true,
+ ]);
+
+ $this->actingAs($user)->get(route('forums.show', ['id' => $forum->id]))
+ ->assertRedirect(route('forums.categories.show', ['id' => $forum->id]));
+ }
+
+ #[Test]
+ public function subscriptions_returns_an_ok_response(): void
+ {
+ $this->seed(UsersTableSeeder::class);
+ $this->seed(GroupsTableSeeder::class);
+
+ $user = User::factory()->create();
+
+ $this->actingAs($user)->get(route('subscriptions.index'))
+ ->assertOk()
+ ->assertViewIs('forum.subscriptions')
+ ->assertSeeLivewire(SubscribedForum::class);
+ }
+}
diff --git a/tests/Old/HomeControllerTest.php b/tests/Old/HomeControllerTest.php
new file mode 100644
index 000000000..7b98dee37
--- /dev/null
+++ b/tests/Old/HomeControllerTest.php
@@ -0,0 +1,70 @@
+seed(GroupsTableSeeder::class);
+ }
+
+ #[Test]
+ public function whenNotAuthenticatedHomepageRedirectsToLogin(): void
+ {
+ $response = $this->get('/');
+
+ $response->assertRedirect(route('login'));
+ }
+
+ #[Test]
+ public function whenAuthenticatedHomepageReturns200(): void
+ {
+ $user = User::factory()->create();
+
+ $this->actingAs($user)
+ ->get(route('home.index'))
+ ->assertOk()
+ ->assertViewIs('home.index')
+ ->assertViewHas('user')
+ ->assertViewHas('personal_freeleech')
+ ->assertViewHas('users')
+ ->assertViewHas('groups')
+ ->assertViewHas('articles')
+ ->assertViewHas('newest')
+ ->assertViewHas('seeded')
+ ->assertViewHas('dying')
+ ->assertViewHas('leeched')
+ ->assertViewHas('dead')
+ ->assertViewHas('topics')
+ ->assertViewHas('posts')
+ ->assertViewHas('featured')
+ ->assertViewHas('poll')
+ ->assertViewHas('uploaders')
+ ->assertViewHas('past_uploaders')
+ ->assertViewHas('freeleech_tokens')
+ ->assertViewHas('bookmarks');
+ }
+
+ #[Test]
+ public function whenAuthenticatedAndTwoStepRequiredHomepageRedirectsToTwoStep(): void
+ {
+ $user = User::factory()->create([
+ 'twostep' => true,
+ ]);
+
+ $this->actingAs($user)
+ ->get(route('home.index'))
+ ->assertRedirect(route('verificationNeeded'));
+ }
+}
diff --git a/tests/Old/TorrentControllerTest.php b/tests/Old/TorrentControllerTest.php
new file mode 100644
index 000000000..4ea7f81bc
--- /dev/null
+++ b/tests/Old/TorrentControllerTest.php
@@ -0,0 +1,142 @@
+create();
+
+ $response = $this->actingAs($user, 'api')->getJson('api/torrents/filter');
+
+ $response->assertOk()
+ ->assertJson([
+ 'data' => [],
+ 'links' => [
+ 'first' => null,
+ 'last' => null,
+ 'prev' => null,
+ 'next' => null,
+ 'self' => sprintf('%s/api/torrents', appurl()),
+ ],
+ 'meta' => [
+ 'path' => sprintf('%s/api/torrents/filter', appurl()),
+ 'per_page' => 25,
+ 'next_cursor' => null,
+ 'prev_cursor' => null,
+ ],
+ ]);
+ }
+
+ #[Test]
+ public function index_returns_an_ok_response(): void
+ {
+ $user = User::factory()->create();
+
+ $response = $this->actingAs($user, 'api')->getJson(route('api.torrents.index'));
+
+ $response->assertOk()
+ ->assertJson([
+ 'data' => [],
+ 'links' => [
+ 'first' => sprintf('%s/api/torrents?page=1', appurl()),
+ 'last' => sprintf('%s/api/torrents?page=1', appurl()),
+ 'prev' => null,
+ 'next' => null,
+ 'self' => sprintf('%s/api/torrents', appurl()),
+ ],
+ 'meta' => [
+ 'current_page' => 1,
+ 'from' => null,
+ 'last_page' => 1,
+ 'path' => sprintf('%s/api/torrents', appurl()),
+ 'per_page' => 25,
+ 'to' => null,
+ 'total' => 0,
+ ],
+ ]);
+ }
+
+ #[Test]
+ public function show_returns_an_ok_response(): void
+ {
+ $user = User::factory()->create();
+
+ $torrent = Torrent::factory()->create([
+ 'user_id' => $user->id,
+ 'status' => Torrent::APPROVED,
+ ]);
+
+ $response = $this->actingAs($user, 'api')->getJson(sprintf('api/torrents/%s', $torrent->id));
+
+ $response->assertOk()
+ ->assertJson([
+ 'type' => 'torrent',
+ 'id' => $torrent->id,
+ ]);
+ }
+
+ #[Test]
+ public function store_returns_an_ok_response(): void
+ {
+ $this->seed(UsersTableSeeder::class);
+ $this->seed(ChatroomTableSeeder::class);
+ $this->seed(BotsTableSeeder::class);
+
+ $user = User::factory()->create();
+
+ $category = Category::factory()->create();
+ $type = Type::factory()->create();
+ $resolution = Resolution::factory()->create();
+
+ $torrent = Torrent::factory()->make();
+
+ $response = $this->actingAs($user, 'api')->postJson('api/torrents/upload', [
+ 'torrent' => new UploadedFile(
+ base_path('tests/Resources/Pony Music - Mind Fragments (2014).torrent'),
+ 'Pony Music - Mind Fragments (2014).torrent'
+ ),
+ 'category_id' => $category->id,
+ 'name' => 'Pony Music - Mind Fragments (2014)',
+ 'description' => 'One song that represents the elements of being lost, abandoned, sadness and innocence.',
+ 'imdb' => $torrent->imdb,
+ 'tvdb' => $torrent->tvdb,
+ 'tmdb' => $torrent->tmdb,
+ 'mal' => $torrent->mal,
+ 'igdb' => $torrent->igdb,
+ 'type_id' => $type->id,
+ 'resolution_id' => $resolution->id,
+ 'anonymous' => $torrent->anon,
+ 'stream' => $torrent->stream,
+ 'sd' => $torrent->sd,
+ 'internal' => $torrent->internal,
+ 'featured' => false,
+ 'doubleup' => $torrent->doubleup,
+ 'free' => $torrent->free,
+ 'sticky' => $torrent->sticky,
+ ]);
+
+ $response->assertOk()
+ ->assertJson([
+ 'success' => true,
+ 'message' => 'Torrent uploaded successfully.',
+ ]);
+ }
+}
diff --git a/tests/Old/TwoStepControllerTest.php b/tests/Old/TwoStepControllerTest.php
new file mode 100644
index 000000000..1d7b37551
--- /dev/null
+++ b/tests/Old/TwoStepControllerTest.php
@@ -0,0 +1,78 @@
+ true]);
+
+ $this->seed(GroupsTableSeeder::class);
+
+ $user = User::factory()->create([
+ 'twostep' => true,
+ ]);
+
+ TwoStepAuth::factory()->create([
+ 'userId' => $user->id,
+ ]);
+
+ $this->actingAs($user)->post(route('resend'))
+ ->assertRedirect(route('verificationNeeded'));
+ }
+
+ #[Test]
+ public function show_verification_returns_an_ok_response(): void
+ {
+ config(['auth.TwoStepEnabled' => true]);
+
+ $this->seed(GroupsTableSeeder::class);
+
+ $user = User::factory()->create([
+ 'twostep' => true,
+ ]);
+
+ TwoStepAuth::factory()->create([
+ 'userId' => $user->id,
+ ]);
+
+ $this->actingAs($user)->get(route('verificationNeeded'))
+ ->assertOk()
+ ->assertViewIs('auth.twostep-verification');
+ }
+
+ #[Test]
+ public function verify_returns_an_ok_response(): void
+ {
+ config(['auth.TwoStepEnabled' => true]);
+
+ $this->seed(GroupsTableSeeder::class);
+
+ $user = User::factory()->create([
+ 'twostep' => true,
+ ]);
+
+ $twoStep = TwoStepAuth::factory()->create([
+ 'userId' => $user->id,
+ ]);
+
+ $this->actingAs($user)->postJson(route('verify'), [
+ 'v_input_1' => $twoStep->authCode[0],
+ 'v_input_2' => $twoStep->authCode[1],
+ 'v_input_3' => $twoStep->authCode[2],
+ 'v_input_4' => $twoStep->authCode[3],
+ ], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])
+ ->assertOk();
+ }
+}
diff --git a/tests/Pest.php b/tests/Pest.php
index 68ddc81b5..f4e490832 100644
--- a/tests/Pest.php
+++ b/tests/Pest.php
@@ -1,5 +1,4 @@
in('Feature');
+)->in('Feature', 'Unit');
/*
|--------------------------------------------------------------------------
diff --git a/tests/TestCase.php b/tests/TestCase.php
index 27dc9d357..0448593ff 100644
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -2,13 +2,14 @@
namespace Tests;
+use AllowDynamicProperties;
use JMac\Testing\Traits\AdditionalAssertions;
use App\Console\Kernel;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\RefreshDatabaseState;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
-abstract class TestCase extends BaseTestCase
+#[AllowDynamicProperties] abstract class TestCase extends BaseTestCase
{
use AdditionalAssertions;
use CreatesApplication;
@@ -28,7 +29,7 @@ abstract class TestCase extends BaseTestCase
$this->artisan('cache:clear');
// For LARAVEL_START used in sub-footer
- if (! \defined('LARAVEL_START')) {
+ if (!\defined('LARAVEL_START')) {
\define('LARAVEL_START', microtime(true));
}
}
@@ -40,7 +41,7 @@ abstract class TestCase extends BaseTestCase
*/
protected function refreshTestDatabase(): void
{
- if (! RefreshDatabaseState::$migrated) {
+ if (!RefreshDatabaseState::$migrated) {
if (config('database.pristine-db-file')) {
// If a flat file is defined, load it.
diff --git a/tests/Unit/Console/Commands/AutoBonAllocationTest.php b/tests/Unit/Console/Commands/AutoBonAllocationTest.php
deleted file mode 100644
index 0c1d1d0d3..000000000
--- a/tests/Unit/Console/Commands/AutoBonAllocationTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('auto:bon_allocation')
- ->expectsOutput('Automated BON Allocation Command Complete')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Console/Commands/AutoCorrectHistoryTest.php b/tests/Unit/Console/Commands/AutoCorrectHistoryTest.php
deleted file mode 100644
index 57c6204bd..000000000
--- a/tests/Unit/Console/Commands/AutoCorrectHistoryTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('auto:correct_history')
- ->expectsOutput('Automated History Record Correction Command Complete')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Console/Commands/AutoDeactivateWarningTest.php b/tests/Unit/Console/Commands/AutoDeactivateWarningTest.php
deleted file mode 100644
index bd0058905..000000000
--- a/tests/Unit/Console/Commands/AutoDeactivateWarningTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('auto:deactivate_warning')
- ->expectsOutput('Automated Warning Deativation Command Complete')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Console/Commands/AutoDisableInactiveUsersTest.php b/tests/Unit/Console/Commands/AutoDisableInactiveUsersTest.php
deleted file mode 100644
index 77f0e0b48..000000000
--- a/tests/Unit/Console/Commands/AutoDisableInactiveUsersTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('auto:disable_inactive_users')
- ->expectsOutput('Automated User Disable Command Complete')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Console/Commands/AutoFlushPeersTest.php b/tests/Unit/Console/Commands/AutoFlushPeersTest.php
deleted file mode 100644
index 25f739b74..000000000
--- a/tests/Unit/Console/Commands/AutoFlushPeersTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('auto:flush_peers')
- ->expectsOutput('Automated Flush Ghost Peers Command Complete')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Console/Commands/AutoGraveyardTest.php b/tests/Unit/Console/Commands/AutoGraveyardTest.php
deleted file mode 100644
index 017597157..000000000
--- a/tests/Unit/Console/Commands/AutoGraveyardTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('auto:graveyard')
- ->expectsOutput('Automated Graveyard Rewards Command Complete')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Console/Commands/AutoGroupTest.php b/tests/Unit/Console/Commands/AutoGroupTest.php
deleted file mode 100644
index f346f3abe..000000000
--- a/tests/Unit/Console/Commands/AutoGroupTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('auto:group')
- ->expectsOutput('Automated User Group Command Complete')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Console/Commands/AutoHighspeedTagTest.php b/tests/Unit/Console/Commands/AutoHighspeedTagTest.php
deleted file mode 100644
index 9649be572..000000000
--- a/tests/Unit/Console/Commands/AutoHighspeedTagTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('auto:highspeed_tag')
- ->expectsOutput('Automated High Speed Torrents Command Complete')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Console/Commands/AutoPreWarningTest.php b/tests/Unit/Console/Commands/AutoPreWarningTest.php
deleted file mode 100644
index b58a3c7f6..000000000
--- a/tests/Unit/Console/Commands/AutoPreWarningTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('auto:prewarning')
- ->expectsOutput('Automated User Pre-Warning Command Complete')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Console/Commands/AutoRecycleAuditsTest.php b/tests/Unit/Console/Commands/AutoRecycleAuditsTest.php
deleted file mode 100644
index fcbdf9261..000000000
--- a/tests/Unit/Console/Commands/AutoRecycleAuditsTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('auto:recycle_activity_log')
- ->expectsOutput('Automated Purge Old Audits Command Complete')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Console/Commands/AutoRecycleClaimedTorrentRequestsTest.php b/tests/Unit/Console/Commands/AutoRecycleClaimedTorrentRequestsTest.php
deleted file mode 100644
index 2428b6f0d..000000000
--- a/tests/Unit/Console/Commands/AutoRecycleClaimedTorrentRequestsTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('auto:recycle_claimed_torrent_requests')
- ->expectsOutput('Automated Request Claim Reset Command Complete')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Console/Commands/AutoRecycleFailedLoginsTest.php b/tests/Unit/Console/Commands/AutoRecycleFailedLoginsTest.php
deleted file mode 100644
index 3e4b42a2b..000000000
--- a/tests/Unit/Console/Commands/AutoRecycleFailedLoginsTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('auto:recycle_failed_logins')
- ->expectsOutput('Automated Purge Old Failed Logins Command Complete')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Console/Commands/AutoRecycleInvitesTest.php b/tests/Unit/Console/Commands/AutoRecycleInvitesTest.php
deleted file mode 100644
index c4e7e0e8a..000000000
--- a/tests/Unit/Console/Commands/AutoRecycleInvitesTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('auto:recycle_invites')
- ->expectsOutput('Automated Purge Unaccepted Invites Command Complete')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Console/Commands/AutoRemoveFeaturedTorrentTest.php b/tests/Unit/Console/Commands/AutoRemoveFeaturedTorrentTest.php
deleted file mode 100644
index 14d6a5010..000000000
--- a/tests/Unit/Console/Commands/AutoRemoveFeaturedTorrentTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('auto:remove_featured_torrent')
- ->expectsOutput('Automated Removal Featured Torrents Command Complete')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Console/Commands/AutoRemovePersonalFreeleechTest.php b/tests/Unit/Console/Commands/AutoRemovePersonalFreeleechTest.php
deleted file mode 100644
index 648a3ef5b..000000000
--- a/tests/Unit/Console/Commands/AutoRemovePersonalFreeleechTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('auto:remove_personal_freeleech')
- ->expectsOutput('Automated Removal User Personal Freeleech Command Complete')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Console/Commands/AutoSoftDeleteDisabledUsersTest.php b/tests/Unit/Console/Commands/AutoSoftDeleteDisabledUsersTest.php
deleted file mode 100644
index 6369fce68..000000000
--- a/tests/Unit/Console/Commands/AutoSoftDeleteDisabledUsersTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('auto:softdelete_disabled_users')
- ->expectsOutput('Automated Soft Delete Disabled Users Command Complete')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Console/Commands/AutoWarningTest.php b/tests/Unit/Console/Commands/AutoWarningTest.php
deleted file mode 100644
index 7fa6afaca..000000000
--- a/tests/Unit/Console/Commands/AutoWarningTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('auto:warning')
- ->expectsOutput('Automated User Warning Command Complete')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Console/Commands/ClearCacheTest.php b/tests/Unit/Console/Commands/ClearCacheTest.php
deleted file mode 100644
index 7d04a7973..000000000
--- a/tests/Unit/Console/Commands/ClearCacheTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('clear:all_cache')
- ->expectsOutput('Clearing several common cache\'s ...')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Console/Commands/SetCacheTest.php b/tests/Unit/Console/Commands/SetCacheTest.php
deleted file mode 100644
index 017c301f3..000000000
--- a/tests/Unit/Console/Commands/SetCacheTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('set:all_cache')
- ->expectsOutput('Setting several common cache\'s ...')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Console/Commands/SyncPeersTest.php b/tests/Unit/Console/Commands/SyncPeersTest.php
deleted file mode 100644
index 38fc19bec..000000000
--- a/tests/Unit/Console/Commands/SyncPeersTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-artisan('auto:sync_peers')
- ->expectsOutput('Torrent Peer Syncing Command Complete')
- ->assertExitCode(0)
- ->run();
- }
-}
diff --git a/tests/Unit/Http/Requests/MassUpsertPlaylistTorrentRequestTest.php b/tests/Unit/Http/Requests/MassUpsertPlaylistTorrentRequestTest.php
index b66294f69..543fca913 100644
--- a/tests/Unit/Http/Requests/MassUpsertPlaylistTorrentRequestTest.php
+++ b/tests/Unit/Http/Requests/MassUpsertPlaylistTorrentRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\MassUpsertPlaylistTorrentRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\MassUpsertPlaylistTorrentRequest();
+ $this->subject = new MassUpsertPlaylistTorrentRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -29,5 +38,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/ApproveApplicationRequestTest.php b/tests/Unit/Http/Requests/Staff/ApproveApplicationRequestTest.php
index ce5a02e71..9f22ca3d3 100644
--- a/tests/Unit/Http/Requests/Staff/ApproveApplicationRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/ApproveApplicationRequestTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\ApproveApplicationRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\ApproveApplicationRequest();
+ $this->subject = new ApproveApplicationRequest();
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -23,5 +34,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/DestroyDistributorRequestTest.php b/tests/Unit/Http/Requests/Staff/DestroyDistributorRequestTest.php
index cf5df1fca..1560ab166 100644
--- a/tests/Unit/Http/Requests/Staff/DestroyDistributorRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/DestroyDistributorRequestTest.php
@@ -1,13 +1,27 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\DestroyDistributorRequest;
+use App\Models\Distributor;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\DestroyDistributorRequest();
+ $this->subject = new DestroyDistributorRequest();
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
+ $distributor = Distributor::factory()->create();
- $actual = $this->subject->rules();
+ $actual = $this->subject->rules($distributor);
$this->assertValidationRules([
'distributor_id' => [
@@ -15,5 +29,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/DestroyRegionRequestTest.php b/tests/Unit/Http/Requests/Staff/DestroyRegionRequestTest.php
index 329a0ccea..de2f48ae2 100644
--- a/tests/Unit/Http/Requests/Staff/DestroyRegionRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/DestroyRegionRequestTest.php
@@ -1,13 +1,27 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\DestroyRegionRequest;
+use App\Models\Region;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\DestroyRegionRequest();
+ $this->subject = new DestroyRegionRequest();
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
+ $region = Region::factory()->create();
- $actual = $this->subject->rules();
+ $actual = $this->subject->rules($region);
$this->assertValidationRules([
'region_id' => [
@@ -15,5 +29,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/RejectApplicationRequestTest.php b/tests/Unit/Http/Requests/Staff/RejectApplicationRequestTest.php
index a189196ae..0d0212e83 100644
--- a/tests/Unit/Http/Requests/Staff/RejectApplicationRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/RejectApplicationRequestTest.php
@@ -1,17 +1,26 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\RejectApplicationRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\RejectApplicationRequest();
+ $this->subject = new RejectApplicationRequest();
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
'deny' => 'required',
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreArticleRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreArticleRequestTest.php
index 7b4362df3..5f884a5e6 100644
--- a/tests/Unit/Http/Requests/Staff/StoreArticleRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreArticleRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreArticleRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreArticleRequest();
+ $this->subject = new StoreArticleRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -33,5 +42,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreBanRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreBanRequestTest.php
index 10dc5f78d..4bc575fed 100644
--- a/tests/Unit/Http/Requests/Staff/StoreBanRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreBanRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreBanRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreBanRequest();
+ $this->subject = new StoreBanRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -27,5 +36,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreBlacklistClientRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreBlacklistClientRequestTest.php
index ae23d49e1..421fd0c06 100644
--- a/tests/Unit/Http/Requests/Staff/StoreBlacklistClientRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreBlacklistClientRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreBlacklistClientRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreBlacklistClientRequest();
+ $this->subject = new StoreBlacklistClientRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -29,5 +38,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreBonExchangeRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreBonExchangeRequestTest.php
index 726a86e50..c79718265 100644
--- a/tests/Unit/Http/Requests/Staff/StoreBonExchangeRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreBonExchangeRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreBonExchangeRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreBonExchangeRequest();
+ $this->subject = new StoreBonExchangeRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -38,5 +47,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreCategoryRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreCategoryRequestTest.php
index e4896cdca..79e636d09 100644
--- a/tests/Unit/Http/Requests/Staff/StoreCategoryRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreCategoryRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreCategoryRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreCategoryRequest();
+ $this->subject = new StoreCategoryRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -41,5 +50,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreChatRoomRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreChatRoomRequestTest.php
index 96ddc3226..0e7756f6f 100644
--- a/tests/Unit/Http/Requests/Staff/StoreChatRoomRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreChatRoomRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreChatRoomRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreChatRoomRequest();
+ $this->subject = new StoreChatRoomRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -25,5 +34,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreChatStatusRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreChatStatusRequestTest.php
index 5b7829bce..2831cd2b4 100644
--- a/tests/Unit/Http/Requests/Staff/StoreChatStatusRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreChatStatusRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreChatStatusRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreChatStatusRequest();
+ $this->subject = new StoreChatStatusRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -29,5 +38,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreDistributorRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreDistributorRequestTest.php
index 913ae1a1f..f4f61b446 100644
--- a/tests/Unit/Http/Requests/Staff/StoreDistributorRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreDistributorRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreDistributorRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreDistributorRequest();
+ $this->subject = new StoreDistributorRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -27,5 +36,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreForumRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreForumRequestTest.php
index 468260440..efc1d6e65 100644
--- a/tests/Unit/Http/Requests/Staff/StoreForumRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreForumRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreForumRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreForumRequest();
+ $this->subject = new StoreForumRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -57,5 +66,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreGiftRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreGiftRequestTest.php
index 7fcff280a..4fc55e8fb 100644
--- a/tests/Unit/Http/Requests/Staff/StoreGiftRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreGiftRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreGiftRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreGiftRequest();
+ $this->subject = new StoreGiftRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -40,5 +49,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreGroupRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreGroupRequestTest.php
index 897307412..a595cbba9 100644
--- a/tests/Unit/Http/Requests/Staff/StoreGroupRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreGroupRequestTest.php
@@ -1,7 +1,20 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreGroupRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreGroupRequest();
+ $this->subject = new StoreGroupRequest();
});
test('authorize', function (): void {
@@ -13,8 +26,6 @@ test('authorize', function (): void {
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -90,5 +101,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreInternalRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreInternalRequestTest.php
index e22349737..f14980514 100644
--- a/tests/Unit/Http/Requests/Staff/StoreInternalRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreInternalRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreInternalRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreInternalRequest();
+ $this->subject = new StoreInternalRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -29,5 +38,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreMassActionRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreMassActionRequestTest.php
index ea2c28538..0e31a654e 100644
--- a/tests/Unit/Http/Requests/Staff/StoreMassActionRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreMassActionRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreMassActionRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreMassActionRequest();
+ $this->subject = new StoreMassActionRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -30,5 +39,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreMediaLanguageRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreMediaLanguageRequestTest.php
index 564c5a8de..c1a33a170 100644
--- a/tests/Unit/Http/Requests/Staff/StoreMediaLanguageRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreMediaLanguageRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreMediaLanguageRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreMediaLanguageRequest();
+ $this->subject = new StoreMediaLanguageRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -30,5 +39,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreNoteRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreNoteRequestTest.php
index 07ca7b539..f8952262e 100644
--- a/tests/Unit/Http/Requests/Staff/StoreNoteRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreNoteRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreNoteRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreNoteRequest();
+ $this->subject = new StoreNoteRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -24,5 +33,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StorePageRequestTest.php b/tests/Unit/Http/Requests/Staff/StorePageRequestTest.php
index 5c1253466..fbefea03f 100644
--- a/tests/Unit/Http/Requests/Staff/StorePageRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StorePageRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StorePageRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StorePageRequest();
+ $this->subject = new StorePageRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -28,5 +37,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreRegionRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreRegionRequestTest.php
index 3f7948b46..cb0eb1734 100644
--- a/tests/Unit/Http/Requests/Staff/StoreRegionRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreRegionRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreRegionRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreRegionRequest();
+ $this->subject = new StoreRegionRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -27,5 +36,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreResolutionRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreResolutionRequestTest.php
index 6c5ad05a6..2c31577cb 100644
--- a/tests/Unit/Http/Requests/Staff/StoreResolutionRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreResolutionRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreResolutionRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreResolutionRequest();
+ $this->subject = new StoreResolutionRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -26,5 +35,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreRssRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreRssRequestTest.php
index d28b44341..d3c6a8733 100644
--- a/tests/Unit/Http/Requests/Staff/StoreRssRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreRssRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreRssRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreRssRequest();
+ $this->subject = new StoreRssRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -143,5 +152,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreTypeRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreTypeRequestTest.php
index a64c95bd9..14573914b 100644
--- a/tests/Unit/Http/Requests/Staff/StoreTypeRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreTypeRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreTypeRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreTypeRequest();
+ $this->subject = new StoreTypeRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -26,5 +35,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreUnbanRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreUnbanRequestTest.php
index 0dc73604a..05a910933 100644
--- a/tests/Unit/Http/Requests/Staff/StoreUnbanRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreUnbanRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreUnbanRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreUnbanRequest();
+ $this->subject = new StoreUnbanRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -32,5 +41,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/StoreWatchedUserRequestTest.php b/tests/Unit/Http/Requests/Staff/StoreWatchedUserRequestTest.php
index 4b0814a8e..cb9ee3db2 100644
--- a/tests/Unit/Http/Requests/Staff/StoreWatchedUserRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/StoreWatchedUserRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\StoreWatchedUserRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\StoreWatchedUserRequest();
+ $this->subject = new StoreWatchedUserRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -28,5 +37,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdateArticleRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdateArticleRequestTest.php
index f6c279fcb..0dd792e1d 100644
--- a/tests/Unit/Http/Requests/Staff/UpdateArticleRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdateArticleRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdateArticleRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdateArticleRequest();
+ $this->subject = new UpdateArticleRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -33,5 +42,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdateBlacklistClientRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdateBlacklistClientRequestTest.php
index 3e6d3e562..7d7fb6929 100644
--- a/tests/Unit/Http/Requests/Staff/UpdateBlacklistClientRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdateBlacklistClientRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdateBlacklistClientRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdateBlacklistClientRequest();
+ $this->subject = new UpdateBlacklistClientRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -30,5 +39,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdateBonExchangeRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdateBonExchangeRequestTest.php
index 91c5e01bc..28052414f 100644
--- a/tests/Unit/Http/Requests/Staff/UpdateBonExchangeRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdateBonExchangeRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdateBonExchangeRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdateBonExchangeRequest();
+ $this->subject = new UpdateBonExchangeRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -38,5 +47,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdateCategoryRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdateCategoryRequestTest.php
index dd847edec..aed93954d 100644
--- a/tests/Unit/Http/Requests/Staff/UpdateCategoryRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdateCategoryRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdateCategoryRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdateCategoryRequest();
+ $this->subject = new UpdateCategoryRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -41,5 +50,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdateChatBotRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdateChatBotRequestTest.php
index 677609852..73f2adda2 100644
--- a/tests/Unit/Http/Requests/Staff/UpdateChatBotRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdateChatBotRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdateChatBotRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdateChatBotRequest();
+ $this->subject = new UpdateChatBotRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -55,5 +64,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdateChatRoomRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdateChatRoomRequestTest.php
index f9cd04b44..2f42998db 100644
--- a/tests/Unit/Http/Requests/Staff/UpdateChatRoomRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdateChatRoomRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdateChatRoomRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdateChatRoomRequest();
+ $this->subject = new UpdateChatRoomRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -25,5 +34,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdateChatStatusRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdateChatStatusRequestTest.php
index cf8f4b236..ddc068482 100644
--- a/tests/Unit/Http/Requests/Staff/UpdateChatStatusRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdateChatStatusRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdateChatStatusRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdateChatStatusRequest();
+ $this->subject = new UpdateChatStatusRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -29,5 +38,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdateDistributorRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdateDistributorRequestTest.php
index c90a09652..3defdae0b 100644
--- a/tests/Unit/Http/Requests/Staff/UpdateDistributorRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdateDistributorRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdateDistributorRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdateDistributorRequest();
+ $this->subject = new UpdateDistributorRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -26,5 +35,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdateForumRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdateForumRequestTest.php
index 4f7357c54..2c1184dfa 100644
--- a/tests/Unit/Http/Requests/Staff/UpdateForumRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdateForumRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdateForumRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdateForumRequest();
+ $this->subject = new UpdateForumRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -54,5 +63,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdateGroupRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdateGroupRequestTest.php
index b99c6912c..cc2b2071b 100644
--- a/tests/Unit/Http/Requests/Staff/UpdateGroupRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdateGroupRequestTest.php
@@ -1,7 +1,20 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdateGroupRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdateGroupRequest();
+ $this->subject = new UpdateGroupRequest();
});
test('authorize', function (): void {
@@ -13,8 +26,6 @@ test('authorize', function (): void {
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -89,5 +100,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdateInternalRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdateInternalRequestTest.php
index 9c7cbf05d..46415218a 100644
--- a/tests/Unit/Http/Requests/Staff/UpdateInternalRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdateInternalRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdateInternalRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdateInternalRequest();
+ $this->subject = new UpdateInternalRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -29,5 +38,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdateMediaLanguageRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdateMediaLanguageRequestTest.php
index 6738af9e2..6458f4be1 100644
--- a/tests/Unit/Http/Requests/Staff/UpdateMediaLanguageRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdateMediaLanguageRequestTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdateMediaLanguageRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdateMediaLanguageRequest();
+ $this->subject = new UpdateMediaLanguageRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
@@ -28,5 +39,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdateModerationRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdateModerationRequestTest.php
index 96858caaa..ba311111a 100644
--- a/tests/Unit/Http/Requests/Staff/UpdateModerationRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdateModerationRequestTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdateModerationRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdateModerationRequest();
+ $this->subject = new UpdateModerationRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
@@ -28,5 +39,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdatePageRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdatePageRequestTest.php
index 2a88fd3d2..08e71033f 100644
--- a/tests/Unit/Http/Requests/Staff/UpdatePageRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdatePageRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdatePageRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdatePageRequest();
+ $this->subject = new UpdatePageRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -28,5 +37,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdateRegionRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdateRegionRequestTest.php
index aad37d436..94b3eb73f 100644
--- a/tests/Unit/Http/Requests/Staff/UpdateRegionRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdateRegionRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdateRegionRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdateRegionRequest();
+ $this->subject = new UpdateRegionRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -26,5 +35,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdateReportRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdateReportRequestTest.php
index b9202a87f..d8ddd55e6 100644
--- a/tests/Unit/Http/Requests/Staff/UpdateReportRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdateReportRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdateReportRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdateReportRequest();
+ $this->subject = new UpdateReportRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -24,5 +33,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdateResolutionRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdateResolutionRequestTest.php
index 2fc253458..773f43140 100644
--- a/tests/Unit/Http/Requests/Staff/UpdateResolutionRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdateResolutionRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdateResolutionRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdateResolutionRequest();
+ $this->subject = new UpdateResolutionRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -26,5 +35,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdateRssRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdateRssRequestTest.php
index a6b09b538..dfa6d3025 100644
--- a/tests/Unit/Http/Requests/Staff/UpdateRssRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdateRssRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdateRssRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdateRssRequest();
+ $this->subject = new UpdateRssRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -143,5 +152,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdateTypeRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdateTypeRequestTest.php
index d3cad4f31..6d22e2d48 100644
--- a/tests/Unit/Http/Requests/Staff/UpdateTypeRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdateTypeRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdateTypeRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdateTypeRequest();
+ $this->subject = new UpdateTypeRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -26,5 +35,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/Staff/UpdateUserRequestTest.php b/tests/Unit/Http/Requests/Staff/UpdateUserRequestTest.php
index 65a485fe7..cc18dcc30 100644
--- a/tests/Unit/Http/Requests/Staff/UpdateUserRequestTest.php
+++ b/tests/Unit/Http/Requests/Staff/UpdateUserRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\Staff\UpdateUserRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\Staff\UpdateUserRequest();
+ $this->subject = new UpdateUserRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -66,5 +75,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/StoreGiftRequestTest.php b/tests/Unit/Http/Requests/StoreGiftRequestTest.php
index 62fa47acb..9ab77b615 100644
--- a/tests/Unit/Http/Requests/StoreGiftRequestTest.php
+++ b/tests/Unit/Http/Requests/StoreGiftRequestTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\StoreGiftRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\StoreGiftRequest();
+ $this->subject = new StoreGiftRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
@@ -33,5 +44,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/StorePlaylistRequestTest.php b/tests/Unit/Http/Requests/StorePlaylistRequestTest.php
index b834f7641..b474997b0 100644
--- a/tests/Unit/Http/Requests/StorePlaylistRequestTest.php
+++ b/tests/Unit/Http/Requests/StorePlaylistRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\StorePlaylistRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\StorePlaylistRequest();
+ $this->subject = new StorePlaylistRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -32,5 +41,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/StorePlaylistTorrentRequestTest.php b/tests/Unit/Http/Requests/StorePlaylistTorrentRequestTest.php
index e2511862c..a3a34e2e2 100644
--- a/tests/Unit/Http/Requests/StorePlaylistTorrentRequestTest.php
+++ b/tests/Unit/Http/Requests/StorePlaylistTorrentRequestTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\StorePlaylistTorrentRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\StorePlaylistTorrentRequest();
+ $this->subject = new StorePlaylistTorrentRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
@@ -30,5 +41,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/StorePollTest.php b/tests/Unit/Http/Requests/StorePollTest.php
index 648cad449..ce6753b04 100644
--- a/tests/Unit/Http/Requests/StorePollTest.php
+++ b/tests/Unit/Http/Requests/StorePollTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\StorePoll;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\StorePoll();
+ $this->subject = new StorePoll();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -39,13 +48,9 @@ test('rules', function (): void {
});
test('messages', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->messages();
$this->assertEquals([
'options.*.required' => 'You must fill in all options fields',
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/StorePollVoteRequestTest.php b/tests/Unit/Http/Requests/StorePollVoteRequestTest.php
index ec06d7dc5..558c2e17d 100644
--- a/tests/Unit/Http/Requests/StorePollVoteRequestTest.php
+++ b/tests/Unit/Http/Requests/StorePollVoteRequestTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\StorePollVoteRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\StorePollVoteRequest();
+ $this->subject = new StorePollVoteRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
@@ -30,13 +41,9 @@ test('rules', function (): void {
});
test('messages', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->messages();
$this->assertEquals([
'options.required' => 'You must select an answer',
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/StoreRequestFillRequestTest.php b/tests/Unit/Http/Requests/StoreRequestFillRequestTest.php
index 0db2ca076..aad76ac1c 100644
--- a/tests/Unit/Http/Requests/StoreRequestFillRequestTest.php
+++ b/tests/Unit/Http/Requests/StoreRequestFillRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\StoreRequestFillRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\StoreRequestFillRequest();
+ $this->subject = new StoreRequestFillRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -27,5 +36,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/StoreSubtitleRequestTest.php b/tests/Unit/Http/Requests/StoreSubtitleRequestTest.php
index a69d7bc9d..b615de5b4 100644
--- a/tests/Unit/Http/Requests/StoreSubtitleRequestTest.php
+++ b/tests/Unit/Http/Requests/StoreSubtitleRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\StoreSubtitleRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\StoreSubtitleRequest();
+ $this->subject = new StoreSubtitleRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -39,5 +48,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/StoreTicketRequestTest.php b/tests/Unit/Http/Requests/StoreTicketRequestTest.php
index 4c6098a2b..6a68af179 100644
--- a/tests/Unit/Http/Requests/StoreTicketRequestTest.php
+++ b/tests/Unit/Http/Requests/StoreTicketRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\StoreTicketRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\StoreTicketRequest();
+ $this->subject = new StoreTicketRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -36,5 +45,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/StoreTipRequestTest.php b/tests/Unit/Http/Requests/StoreTipRequestTest.php
index 8ab31a48f..440db9f2e 100644
--- a/tests/Unit/Http/Requests/StoreTipRequestTest.php
+++ b/tests/Unit/Http/Requests/StoreTipRequestTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\StoreTipRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\StoreTipRequest();
+ $this->subject = new StoreTipRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
@@ -45,5 +56,3 @@ test('messages', function (): void {
$this->assertEquals([], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/StoreTorrentRequestBountyRequestTest.php b/tests/Unit/Http/Requests/StoreTorrentRequestBountyRequestTest.php
index 150645140..c19101a09 100644
--- a/tests/Unit/Http/Requests/StoreTorrentRequestBountyRequestTest.php
+++ b/tests/Unit/Http/Requests/StoreTorrentRequestBountyRequestTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\StoreTorrentRequestBountyRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\StoreTorrentRequestBountyRequest();
+ $this->subject = new StoreTorrentRequestBountyRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
@@ -29,5 +40,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/StoreTorrentRequestClaimRequestTest.php b/tests/Unit/Http/Requests/StoreTorrentRequestClaimRequestTest.php
index 887ac4549..84581c958 100644
--- a/tests/Unit/Http/Requests/StoreTorrentRequestClaimRequestTest.php
+++ b/tests/Unit/Http/Requests/StoreTorrentRequestClaimRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\StoreTorrentRequestClaimRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\StoreTorrentRequestClaimRequest();
+ $this->subject = new StoreTorrentRequestClaimRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -24,5 +33,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/StoreTorrentRequestRequestTest.php b/tests/Unit/Http/Requests/StoreTorrentRequestRequestTest.php
index da4cff676..7f9c924c1 100644
--- a/tests/Unit/Http/Requests/StoreTorrentRequestRequestTest.php
+++ b/tests/Unit/Http/Requests/StoreTorrentRequestRequestTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\StoreTorrentRequestRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\StoreTorrentRequestRequest();
+ $this->subject = new StoreTorrentRequestRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
@@ -61,8 +72,6 @@ test('rules', function (): void {
});
test('messages', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->messages();
$this->assertEquals([
@@ -73,5 +82,3 @@ test('messages', function (): void {
'mal.in' => "The MAL ID must be 0 if the media doesn't exist on MAL or you're not requesting a tv or movie.",
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/StoreTorrentRequestTest.php b/tests/Unit/Http/Requests/StoreTorrentRequestTest.php
index 0f7218192..301045719 100644
--- a/tests/Unit/Http/Requests/StoreTorrentRequestTest.php
+++ b/tests/Unit/Http/Requests/StoreTorrentRequestTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\StoreTorrentRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\StoreTorrentRequest();
+ $this->subject = new StoreTorrentRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
@@ -110,8 +121,6 @@ test('rules', function (): void {
});
test('messages', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->messages();
$this->assertEquals([
@@ -122,5 +131,3 @@ test('messages', function (): void {
'mal.in' => "The MAL ID must be 0 if the media doesn't exist on MAL or you're not uploading a tv or movie.",
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/StoreTransactionRequestTest.php b/tests/Unit/Http/Requests/StoreTransactionRequestTest.php
index 83848717d..6a412574f 100644
--- a/tests/Unit/Http/Requests/StoreTransactionRequestTest.php
+++ b/tests/Unit/Http/Requests/StoreTransactionRequestTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\StoreTransactionRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\StoreTransactionRequest();
+ $this->subject = new StoreTransactionRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
@@ -25,5 +36,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/UpdatePlaylistRequestTest.php b/tests/Unit/Http/Requests/UpdatePlaylistRequestTest.php
index f342aad7b..2be098018 100644
--- a/tests/Unit/Http/Requests/UpdatePlaylistRequestTest.php
+++ b/tests/Unit/Http/Requests/UpdatePlaylistRequestTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\UpdatePlaylistRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\UpdatePlaylistRequest();
+ $this->subject = new UpdatePlaylistRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
@@ -32,5 +43,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/UpdatePollRequestTest.php b/tests/Unit/Http/Requests/UpdatePollRequestTest.php
index e3c1ae2bd..e16ce66d6 100644
--- a/tests/Unit/Http/Requests/UpdatePollRequestTest.php
+++ b/tests/Unit/Http/Requests/UpdatePollRequestTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\UpdatePollRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\UpdatePollRequest();
+ $this->subject = new UpdatePollRequest();
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -19,13 +30,9 @@ test('rules', function (): void {
});
test('messages', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->messages();
$this->assertEquals([
'options.*.required' => 'You must fill in all options fields',
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/UpdateSubtitleRequestTest.php b/tests/Unit/Http/Requests/UpdateSubtitleRequestTest.php
index d6ef9908a..36861b5a7 100644
--- a/tests/Unit/Http/Requests/UpdateSubtitleRequestTest.php
+++ b/tests/Unit/Http/Requests/UpdateSubtitleRequestTest.php
@@ -1,20 +1,29 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\UpdateSubtitleRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\UpdateSubtitleRequest();
+ $this->subject = new UpdateSubtitleRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
});
test('rules', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->rules();
$this->assertValidationRules([
@@ -31,5 +40,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/UpdateTorrentRequestRequestTest.php b/tests/Unit/Http/Requests/UpdateTorrentRequestRequestTest.php
index 6f9d2d8be..99a2ed31a 100644
--- a/tests/Unit/Http/Requests/UpdateTorrentRequestRequestTest.php
+++ b/tests/Unit/Http/Requests/UpdateTorrentRequestRequestTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\UpdateTorrentRequestRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\UpdateTorrentRequestRequest();
+ $this->subject = new UpdateTorrentRequestRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
@@ -64,5 +75,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...
diff --git a/tests/Unit/Http/Requests/UpdateTorrentRequestTest.php b/tests/Unit/Http/Requests/UpdateTorrentRequestTest.php
index 507159f70..a9be61043 100644
--- a/tests/Unit/Http/Requests/UpdateTorrentRequestTest.php
+++ b/tests/Unit/Http/Requests/UpdateTorrentRequestTest.php
@@ -1,12 +1,23 @@
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ */
+
+use App\Http\Requests\UpdateTorrentRequest;
beforeEach(function (): void {
- $this->subject = new \App\Http\Requests\UpdateTorrentRequest();
+ $this->subject = new UpdateTorrentRequest();
});
test('authorize', function (): void {
- $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
-
$actual = $this->subject->authorize();
$this->assertTrue($actual);
@@ -111,5 +122,3 @@ test('rules', function (): void {
],
], $actual);
});
-
-// test cases...