diff --git a/routes/inertia.php b/routes/inertia.php index 9482fee73..00d13cfcf 100644 --- a/routes/inertia.php +++ b/routes/inertia.php @@ -21,27 +21,27 @@ } $authMiddleware = config('jetstream.guard') - ? 'auth:'.config('jetstream.guard') - : 'auth'; + ? 'auth:'.config('jetstream.guard') + : 'auth'; $authSessionMiddleware = config('jetstream.auth_session', false) - ? config('jetstream.auth_session') - : null; + ? config('jetstream.auth_session') + : null; Route::group(['middleware' => array_values(array_filter([$authMiddleware, $authSessionMiddleware]))], function () { // User & Profile... Route::get('/user/profile', [UserProfileController::class, 'show']) - ->name('profile.show'); + ->name('profile.show'); Route::delete('/user/other-browser-sessions', [OtherBrowserSessionsController::class, 'destroy']) - ->name('other-browser-sessions.destroy'); + ->name('other-browser-sessions.destroy'); Route::delete('/user/profile-photo', [ProfilePhotoController::class, 'destroy']) - ->name('current-user-photo.destroy'); + ->name('current-user-photo.destroy'); if (Jetstream::hasAccountDeletionFeatures()) { Route::delete('/user', [CurrentUserController::class, 'destroy']) - ->name('current-user.destroy'); + ->name('current-user.destroy'); } Route::group(['middleware' => 'verified'], function () { @@ -66,11 +66,11 @@ Route::delete('/teams/{team}/members/{user}', [TeamMemberController::class, 'destroy'])->name('team-members.destroy'); Route::get('/team-invitations/{invitation}', [TeamInvitationController::class, 'accept']) - ->middleware(['signed']) - ->name('team-invitations.accept'); + ->middleware(['signed']) + ->name('team-invitations.accept'); Route::delete('/team-invitations/{invitation}', [TeamInvitationController::class, 'destroy']) - ->name('team-invitations.destroy'); + ->name('team-invitations.destroy'); } }); }); diff --git a/routes/livewire.php b/routes/livewire.php index 8d44bd625..8de58fc95 100644 --- a/routes/livewire.php +++ b/routes/livewire.php @@ -17,12 +17,12 @@ } $authMiddleware = config('jetstream.guard') - ? 'auth:'.config('jetstream.guard') - : 'auth'; + ? 'auth:'.config('jetstream.guard') + : 'auth'; $authSessionMiddleware = config('jetstream.auth_session', false) - ? config('jetstream.auth_session') - : null; + ? config('jetstream.auth_session') + : null; Route::group(['middleware' => array_values(array_filter([$authMiddleware, $authSessionMiddleware]))], function () { // User & Profile... @@ -41,8 +41,8 @@ Route::put('/current-team', [CurrentTeamController::class, 'update'])->name('current-team.update'); Route::get('/team-invitations/{invitation}', [TeamInvitationController::class, 'accept']) - ->middleware(['signed']) - ->name('team-invitations.accept'); + ->middleware(['signed']) + ->name('team-invitations.accept'); } }); }); diff --git a/stubs/pest-tests/livewire/ApiTokenPermissionsTest.php b/stubs/pest-tests/livewire/ApiTokenPermissionsTest.php index 94eb7710e..6d2fcf0c8 100644 --- a/stubs/pest-tests/livewire/ApiTokenPermissionsTest.php +++ b/stubs/pest-tests/livewire/ApiTokenPermissionsTest.php @@ -20,14 +20,14 @@ ]); Livewire::test(ApiTokenManager::class) - ->set(['managingPermissionsFor' => $token]) - ->set(['updateApiTokenForm' => [ - 'permissions' => [ - 'delete', - 'missing-permission', - ], - ]]) - ->call('updateApiToken'); + ->set(['managingPermissionsFor' => $token]) + ->set(['updateApiTokenForm' => [ + 'permissions' => [ + 'delete', + 'missing-permission', + ], + ]]) + ->call('updateApiToken'); expect($user->fresh()->tokens->first()) ->can('delete')->toBeTrue() diff --git a/stubs/pest-tests/livewire/BrowserSessionsTest.php b/stubs/pest-tests/livewire/BrowserSessionsTest.php index 824837e37..42fb7bb83 100644 --- a/stubs/pest-tests/livewire/BrowserSessionsTest.php +++ b/stubs/pest-tests/livewire/BrowserSessionsTest.php @@ -8,7 +8,7 @@ $this->actingAs($user = User::factory()->create()); Livewire::test(LogoutOtherBrowserSessionsForm::class) - ->set('password', 'password') - ->call('logoutOtherBrowserSessions') - ->assertSuccessful(); + ->set('password', 'password') + ->call('logoutOtherBrowserSessions') + ->assertSuccessful(); }); diff --git a/stubs/pest-tests/livewire/CreateApiTokenTest.php b/stubs/pest-tests/livewire/CreateApiTokenTest.php index 8031240c0..61688953e 100644 --- a/stubs/pest-tests/livewire/CreateApiTokenTest.php +++ b/stubs/pest-tests/livewire/CreateApiTokenTest.php @@ -13,14 +13,14 @@ } Livewire::test(ApiTokenManager::class) - ->set(['createApiTokenForm' => [ - 'name' => 'Test Token', - 'permissions' => [ - 'read', - 'update', - ], - ]]) - ->call('createApiToken'); + ->set(['createApiTokenForm' => [ + 'name' => 'Test Token', + 'permissions' => [ + 'read', + 'update', + ], + ]]) + ->call('createApiToken'); expect($user->fresh()->tokens)->toHaveCount(1); expect($user->fresh()->tokens->first()) diff --git a/stubs/pest-tests/livewire/CreateTeamTest.php b/stubs/pest-tests/livewire/CreateTeamTest.php index 433b7aebd..cea488048 100644 --- a/stubs/pest-tests/livewire/CreateTeamTest.php +++ b/stubs/pest-tests/livewire/CreateTeamTest.php @@ -8,8 +8,8 @@ $this->actingAs($user = User::factory()->withPersonalTeam()->create()); Livewire::test(CreateTeamForm::class) - ->set(['state' => ['name' => 'Test Team']]) - ->call('createTeam'); + ->set(['state' => ['name' => 'Test Team']]) + ->call('createTeam'); expect($user->fresh()->ownedTeams)->toHaveCount(2); expect($user->fresh()->ownedTeams()->latest('id')->first()->name)->toEqual('Test Team'); diff --git a/stubs/pest-tests/livewire/DeleteAccountTest.php b/stubs/pest-tests/livewire/DeleteAccountTest.php index d5c9a311a..1738bceb0 100644 --- a/stubs/pest-tests/livewire/DeleteAccountTest.php +++ b/stubs/pest-tests/livewire/DeleteAccountTest.php @@ -9,8 +9,8 @@ $this->actingAs($user = User::factory()->create()); $component = Livewire::test(DeleteUserForm::class) - ->set('password', 'password') - ->call('deleteUser'); + ->set('password', 'password') + ->call('deleteUser'); expect($user->fresh())->toBeNull(); })->skip(function () { @@ -21,9 +21,9 @@ $this->actingAs($user = User::factory()->create()); Livewire::test(DeleteUserForm::class) - ->set('password', 'wrong-password') - ->call('deleteUser') - ->assertHasErrors(['password']); + ->set('password', 'wrong-password') + ->call('deleteUser') + ->assertHasErrors(['password']); expect($user->fresh())->not->toBeNull(); })->skip(function () { diff --git a/stubs/pest-tests/livewire/DeleteApiTokenTest.php b/stubs/pest-tests/livewire/DeleteApiTokenTest.php index 1b512fcda..7f389228d 100644 --- a/stubs/pest-tests/livewire/DeleteApiTokenTest.php +++ b/stubs/pest-tests/livewire/DeleteApiTokenTest.php @@ -20,8 +20,8 @@ ]); Livewire::test(ApiTokenManager::class) - ->set(['apiTokenIdBeingDeleted' => $token->id]) - ->call('deleteApiToken'); + ->set(['apiTokenIdBeingDeleted' => $token->id]) + ->call('deleteApiToken'); expect($user->fresh()->tokens)->toHaveCount(0); })->skip(function () { diff --git a/stubs/pest-tests/livewire/DeleteTeamTest.php b/stubs/pest-tests/livewire/DeleteTeamTest.php index ffe37d2cf..314d4d380 100644 --- a/stubs/pest-tests/livewire/DeleteTeamTest.php +++ b/stubs/pest-tests/livewire/DeleteTeamTest.php @@ -17,7 +17,7 @@ ); $component = Livewire::test(DeleteTeamForm::class, ['team' => $team->fresh()]) - ->call('deleteTeam'); + ->call('deleteTeam'); expect($team->fresh())->toBeNull(); expect($otherUser->fresh()->teams)->toHaveCount(0); @@ -27,8 +27,8 @@ $this->actingAs($user = User::factory()->withPersonalTeam()->create()); $component = Livewire::test(DeleteTeamForm::class, ['team' => $user->currentTeam]) - ->call('deleteTeam') - ->assertHasErrors(['team']); + ->call('deleteTeam') + ->assertHasErrors(['team']); expect($user->currentTeam->fresh())->not->toBeNull(); }); diff --git a/stubs/pest-tests/livewire/InviteTeamMemberTest.php b/stubs/pest-tests/livewire/InviteTeamMemberTest.php index a2375178d..50ab3699a 100644 --- a/stubs/pest-tests/livewire/InviteTeamMemberTest.php +++ b/stubs/pest-tests/livewire/InviteTeamMemberTest.php @@ -13,10 +13,10 @@ $this->actingAs($user = User::factory()->withPersonalTeam()->create()); $component = Livewire::test(TeamMemberManager::class, ['team' => $user->currentTeam]) - ->set('addTeamMemberForm', [ - 'email' => 'test@example.com', - 'role' => 'admin', - ])->call('addTeamMember'); + ->set('addTeamMemberForm', [ + 'email' => 'test@example.com', + 'role' => 'admin', + ])->call('addTeamMember'); Mail::assertSent(TeamInvitation::class); @@ -32,10 +32,10 @@ // Add the team member... $component = Livewire::test(TeamMemberManager::class, ['team' => $user->currentTeam]) - ->set('addTeamMemberForm', [ - 'email' => 'test@example.com', - 'role' => 'admin', - ])->call('addTeamMember'); + ->set('addTeamMemberForm', [ + 'email' => 'test@example.com', + 'role' => 'admin', + ])->call('addTeamMember'); $invitationId = $user->currentTeam->fresh()->teamInvitations->first()->id; diff --git a/stubs/pest-tests/livewire/LeaveTeamTest.php b/stubs/pest-tests/livewire/LeaveTeamTest.php index 9696a5cb5..30e4a0075 100644 --- a/stubs/pest-tests/livewire/LeaveTeamTest.php +++ b/stubs/pest-tests/livewire/LeaveTeamTest.php @@ -14,7 +14,7 @@ $this->actingAs($otherUser); $component = Livewire::test(TeamMemberManager::class, ['team' => $user->currentTeam]) - ->call('leaveTeam'); + ->call('leaveTeam'); expect($user->currentTeam->fresh()->users)->toHaveCount(0); }); @@ -23,8 +23,8 @@ $this->actingAs($user = User::factory()->withPersonalTeam()->create()); $component = Livewire::test(TeamMemberManager::class, ['team' => $user->currentTeam]) - ->call('leaveTeam') - ->assertHasErrors(['team']); + ->call('leaveTeam') + ->assertHasErrors(['team']); expect($user->currentTeam->fresh())->not->toBeNull(); }); diff --git a/stubs/pest-tests/livewire/ProfileInformationTest.php b/stubs/pest-tests/livewire/ProfileInformationTest.php index bfc673bb5..c549497d0 100644 --- a/stubs/pest-tests/livewire/ProfileInformationTest.php +++ b/stubs/pest-tests/livewire/ProfileInformationTest.php @@ -17,8 +17,8 @@ $this->actingAs($user = User::factory()->create()); Livewire::test(UpdateProfileInformationForm::class) - ->set('state', ['name' => 'Test Name', 'email' => 'test@example.com']) - ->call('updateProfileInformation'); + ->set('state', ['name' => 'Test Name', 'email' => 'test@example.com']) + ->call('updateProfileInformation'); expect($user->fresh()) ->name->toEqual('Test Name') diff --git a/stubs/pest-tests/livewire/RemoveTeamMemberTest.php b/stubs/pest-tests/livewire/RemoveTeamMemberTest.php index c823dcabe..84c4a016f 100644 --- a/stubs/pest-tests/livewire/RemoveTeamMemberTest.php +++ b/stubs/pest-tests/livewire/RemoveTeamMemberTest.php @@ -12,8 +12,8 @@ ); $component = Livewire::test(TeamMemberManager::class, ['team' => $user->currentTeam]) - ->set('teamMemberIdBeingRemoved', $otherUser->id) - ->call('removeTeamMember'); + ->set('teamMemberIdBeingRemoved', $otherUser->id) + ->call('removeTeamMember'); expect($user->currentTeam->fresh()->users)->toHaveCount(0); }); @@ -28,7 +28,7 @@ $this->actingAs($otherUser); $component = Livewire::test(TeamMemberManager::class, ['team' => $user->currentTeam]) - ->set('teamMemberIdBeingRemoved', $user->id) - ->call('removeTeamMember') - ->assertStatus(403); + ->set('teamMemberIdBeingRemoved', $user->id) + ->call('removeTeamMember') + ->assertStatus(403); }); diff --git a/stubs/pest-tests/livewire/TwoFactorAuthenticationSettingsTest.php b/stubs/pest-tests/livewire/TwoFactorAuthenticationSettingsTest.php index 8fc014494..96da66a10 100644 --- a/stubs/pest-tests/livewire/TwoFactorAuthenticationSettingsTest.php +++ b/stubs/pest-tests/livewire/TwoFactorAuthenticationSettingsTest.php @@ -11,7 +11,7 @@ $this->withSession(['auth.password_confirmed_at' => time()]); Livewire::test(TwoFactorAuthenticationForm::class) - ->call('enableTwoFactorAuthentication'); + ->call('enableTwoFactorAuthentication'); $user = $user->fresh(); @@ -27,8 +27,8 @@ $this->withSession(['auth.password_confirmed_at' => time()]); $component = Livewire::test(TwoFactorAuthenticationForm::class) - ->call('enableTwoFactorAuthentication') - ->call('regenerateRecoveryCodes'); + ->call('enableTwoFactorAuthentication') + ->call('regenerateRecoveryCodes'); $user = $user->fresh(); @@ -46,7 +46,7 @@ $this->withSession(['auth.password_confirmed_at' => time()]); $component = Livewire::test(TwoFactorAuthenticationForm::class) - ->call('enableTwoFactorAuthentication'); + ->call('enableTwoFactorAuthentication'); $this->assertNotNull($user->fresh()->two_factor_secret); diff --git a/stubs/pest-tests/livewire/UpdatePasswordTest.php b/stubs/pest-tests/livewire/UpdatePasswordTest.php index dfea437ff..bd2400fb0 100644 --- a/stubs/pest-tests/livewire/UpdatePasswordTest.php +++ b/stubs/pest-tests/livewire/UpdatePasswordTest.php @@ -9,12 +9,12 @@ $this->actingAs($user = User::factory()->create()); Livewire::test(UpdatePasswordForm::class) - ->set('state', [ - 'current_password' => 'password', - 'password' => 'new-password', - 'password_confirmation' => 'new-password', - ]) - ->call('updatePassword'); + ->set('state', [ + 'current_password' => 'password', + 'password' => 'new-password', + 'password_confirmation' => 'new-password', + ]) + ->call('updatePassword'); expect(Hash::check('new-password', $user->fresh()->password))->toBeTrue(); }); @@ -23,13 +23,13 @@ $this->actingAs($user = User::factory()->create()); Livewire::test(UpdatePasswordForm::class) - ->set('state', [ - 'current_password' => 'wrong-password', - 'password' => 'new-password', - 'password_confirmation' => 'new-password', - ]) - ->call('updatePassword') - ->assertHasErrors(['current_password']); + ->set('state', [ + 'current_password' => 'wrong-password', + 'password' => 'new-password', + 'password_confirmation' => 'new-password', + ]) + ->call('updatePassword') + ->assertHasErrors(['current_password']); expect(Hash::check('password', $user->fresh()->password))->toBeTrue(); }); @@ -38,13 +38,13 @@ $this->actingAs($user = User::factory()->create()); Livewire::test(UpdatePasswordForm::class) - ->set('state', [ - 'current_password' => 'password', - 'password' => 'new-password', - 'password_confirmation' => 'wrong-password', - ]) - ->call('updatePassword') - ->assertHasErrors(['password']); + ->set('state', [ + 'current_password' => 'password', + 'password' => 'new-password', + 'password_confirmation' => 'wrong-password', + ]) + ->call('updatePassword') + ->assertHasErrors(['password']); expect(Hash::check('password', $user->fresh()->password))->toBeTrue(); }); diff --git a/stubs/pest-tests/livewire/UpdateTeamMemberRoleTest.php b/stubs/pest-tests/livewire/UpdateTeamMemberRoleTest.php index 24a5f177c..96cc96934 100644 --- a/stubs/pest-tests/livewire/UpdateTeamMemberRoleTest.php +++ b/stubs/pest-tests/livewire/UpdateTeamMemberRoleTest.php @@ -12,9 +12,9 @@ ); $component = Livewire::test(TeamMemberManager::class, ['team' => $user->currentTeam]) - ->set('managingRoleFor', $otherUser) - ->set('currentRole', 'editor') - ->call('updateRole'); + ->set('managingRoleFor', $otherUser) + ->set('currentRole', 'editor') + ->call('updateRole'); expect($otherUser->fresh()->hasTeamRole( $user->currentTeam->fresh(), 'editor' @@ -31,10 +31,10 @@ $this->actingAs($otherUser); $component = Livewire::test(TeamMemberManager::class, ['team' => $user->currentTeam]) - ->set('managingRoleFor', $otherUser) - ->set('currentRole', 'editor') - ->call('updateRole') - ->assertStatus(403); + ->set('managingRoleFor', $otherUser) + ->set('currentRole', 'editor') + ->call('updateRole') + ->assertStatus(403); expect($otherUser->fresh()->hasTeamRole( $user->currentTeam->fresh(), 'admin' diff --git a/stubs/pest-tests/livewire/UpdateTeamNameTest.php b/stubs/pest-tests/livewire/UpdateTeamNameTest.php index c299bdbac..f54b63223 100644 --- a/stubs/pest-tests/livewire/UpdateTeamNameTest.php +++ b/stubs/pest-tests/livewire/UpdateTeamNameTest.php @@ -8,8 +8,8 @@ $this->actingAs($user = User::factory()->withPersonalTeam()->create()); Livewire::test(UpdateTeamNameForm::class, ['team' => $user->currentTeam]) - ->set(['state' => ['name' => 'Test Team']]) - ->call('updateTeamName'); + ->set(['state' => ['name' => 'Test Team']]) + ->call('updateTeamName'); expect($user->fresh()->ownedTeams)->toHaveCount(1); expect($user->currentTeam->fresh()->name)->toEqual('Test Team'); diff --git a/stubs/tests/PasswordConfirmationTest.php b/stubs/tests/PasswordConfirmationTest.php index 7575d3aba..34c860a90 100644 --- a/stubs/tests/PasswordConfirmationTest.php +++ b/stubs/tests/PasswordConfirmationTest.php @@ -4,7 +4,6 @@ use App\Models\User; use Illuminate\Foundation\Testing\RefreshDatabase; -use Laravel\Jetstream\Features; use Tests\TestCase; class PasswordConfirmationTest extends TestCase diff --git a/stubs/tests/livewire/ApiTokenPermissionsTest.php b/stubs/tests/livewire/ApiTokenPermissionsTest.php index 3be991dcb..b16b54df4 100644 --- a/stubs/tests/livewire/ApiTokenPermissionsTest.php +++ b/stubs/tests/livewire/ApiTokenPermissionsTest.php @@ -31,14 +31,14 @@ public function test_api_token_permissions_can_be_updated(): void ]); Livewire::test(ApiTokenManager::class) - ->set(['managingPermissionsFor' => $token]) - ->set(['updateApiTokenForm' => [ - 'permissions' => [ - 'delete', - 'missing-permission', - ], - ]]) - ->call('updateApiToken'); + ->set(['managingPermissionsFor' => $token]) + ->set(['updateApiTokenForm' => [ + 'permissions' => [ + 'delete', + 'missing-permission', + ], + ]]) + ->call('updateApiToken'); $this->assertTrue($user->fresh()->tokens->first()->can('delete')); $this->assertFalse($user->fresh()->tokens->first()->can('read')); diff --git a/stubs/tests/livewire/BrowserSessionsTest.php b/stubs/tests/livewire/BrowserSessionsTest.php index 32851e040..2fe8a2424 100644 --- a/stubs/tests/livewire/BrowserSessionsTest.php +++ b/stubs/tests/livewire/BrowserSessionsTest.php @@ -17,8 +17,8 @@ public function test_other_browser_sessions_can_be_logged_out(): void $this->actingAs($user = User::factory()->create()); Livewire::test(LogoutOtherBrowserSessionsForm::class) - ->set('password', 'password') - ->call('logoutOtherBrowserSessions') - ->assertSuccessful(); + ->set('password', 'password') + ->call('logoutOtherBrowserSessions') + ->assertSuccessful(); } } diff --git a/stubs/tests/livewire/CreateApiTokenTest.php b/stubs/tests/livewire/CreateApiTokenTest.php index ad01ab88b..744ed90a0 100644 --- a/stubs/tests/livewire/CreateApiTokenTest.php +++ b/stubs/tests/livewire/CreateApiTokenTest.php @@ -24,14 +24,14 @@ public function test_api_tokens_can_be_created(): void $this->actingAs($user = User::factory()->withPersonalTeam()->create()); Livewire::test(ApiTokenManager::class) - ->set(['createApiTokenForm' => [ - 'name' => 'Test Token', - 'permissions' => [ - 'read', - 'update', - ], - ]]) - ->call('createApiToken'); + ->set(['createApiTokenForm' => [ + 'name' => 'Test Token', + 'permissions' => [ + 'read', + 'update', + ], + ]]) + ->call('createApiToken'); $this->assertCount(1, $user->fresh()->tokens); $this->assertEquals('Test Token', $user->fresh()->tokens->first()->name); diff --git a/stubs/tests/livewire/CreateTeamTest.php b/stubs/tests/livewire/CreateTeamTest.php index 860453693..e52e0d015 100644 --- a/stubs/tests/livewire/CreateTeamTest.php +++ b/stubs/tests/livewire/CreateTeamTest.php @@ -17,8 +17,8 @@ public function test_teams_can_be_created(): void $this->actingAs($user = User::factory()->withPersonalTeam()->create()); Livewire::test(CreateTeamForm::class) - ->set(['state' => ['name' => 'Test Team']]) - ->call('createTeam'); + ->set(['state' => ['name' => 'Test Team']]) + ->call('createTeam'); $this->assertCount(2, $user->fresh()->ownedTeams); $this->assertEquals('Test Team', $user->fresh()->ownedTeams()->latest('id')->first()->name); diff --git a/stubs/tests/livewire/DeleteAccountTest.php b/stubs/tests/livewire/DeleteAccountTest.php index c0f1ff951..bcaf59ffd 100644 --- a/stubs/tests/livewire/DeleteAccountTest.php +++ b/stubs/tests/livewire/DeleteAccountTest.php @@ -24,8 +24,8 @@ public function test_user_accounts_can_be_deleted(): void $this->actingAs($user = User::factory()->create()); $component = Livewire::test(DeleteUserForm::class) - ->set('password', 'password') - ->call('deleteUser'); + ->set('password', 'password') + ->call('deleteUser'); $this->assertNull($user->fresh()); } @@ -41,9 +41,9 @@ public function test_correct_password_must_be_provided_before_account_can_be_del $this->actingAs($user = User::factory()->create()); Livewire::test(DeleteUserForm::class) - ->set('password', 'wrong-password') - ->call('deleteUser') - ->assertHasErrors(['password']); + ->set('password', 'wrong-password') + ->call('deleteUser') + ->assertHasErrors(['password']); $this->assertNotNull($user->fresh()); } diff --git a/stubs/tests/livewire/DeleteApiTokenTest.php b/stubs/tests/livewire/DeleteApiTokenTest.php index 75258b52a..6ed0861fc 100644 --- a/stubs/tests/livewire/DeleteApiTokenTest.php +++ b/stubs/tests/livewire/DeleteApiTokenTest.php @@ -31,8 +31,8 @@ public function test_api_tokens_can_be_deleted(): void ]); Livewire::test(ApiTokenManager::class) - ->set(['apiTokenIdBeingDeleted' => $token->id]) - ->call('deleteApiToken'); + ->set(['apiTokenIdBeingDeleted' => $token->id]) + ->call('deleteApiToken'); $this->assertCount(0, $user->fresh()->tokens); } diff --git a/stubs/tests/livewire/DeleteTeamTest.php b/stubs/tests/livewire/DeleteTeamTest.php index b132b62be..5dc288806 100644 --- a/stubs/tests/livewire/DeleteTeamTest.php +++ b/stubs/tests/livewire/DeleteTeamTest.php @@ -26,7 +26,7 @@ public function test_teams_can_be_deleted(): void ); $component = Livewire::test(DeleteTeamForm::class, ['team' => $team->fresh()]) - ->call('deleteTeam'); + ->call('deleteTeam'); $this->assertNull($team->fresh()); $this->assertCount(0, $otherUser->fresh()->teams); @@ -37,8 +37,8 @@ public function test_personal_teams_cant_be_deleted(): void $this->actingAs($user = User::factory()->withPersonalTeam()->create()); $component = Livewire::test(DeleteTeamForm::class, ['team' => $user->currentTeam]) - ->call('deleteTeam') - ->assertHasErrors(['team']); + ->call('deleteTeam') + ->assertHasErrors(['team']); $this->assertNotNull($user->currentTeam->fresh()); } diff --git a/stubs/tests/livewire/InviteTeamMemberTest.php b/stubs/tests/livewire/InviteTeamMemberTest.php index 1820f0f9f..bd04de502 100644 --- a/stubs/tests/livewire/InviteTeamMemberTest.php +++ b/stubs/tests/livewire/InviteTeamMemberTest.php @@ -28,10 +28,10 @@ public function test_team_members_can_be_invited_to_team(): void $this->actingAs($user = User::factory()->withPersonalTeam()->create()); $component = Livewire::test(TeamMemberManager::class, ['team' => $user->currentTeam]) - ->set('addTeamMemberForm', [ - 'email' => 'test@example.com', - 'role' => 'admin', - ])->call('addTeamMember'); + ->set('addTeamMemberForm', [ + 'email' => 'test@example.com', + 'role' => 'admin', + ])->call('addTeamMember'); Mail::assertSent(TeamInvitation::class); @@ -52,10 +52,10 @@ public function test_team_member_invitations_can_be_cancelled(): void // Add the team member... $component = Livewire::test(TeamMemberManager::class, ['team' => $user->currentTeam]) - ->set('addTeamMemberForm', [ - 'email' => 'test@example.com', - 'role' => 'admin', - ])->call('addTeamMember'); + ->set('addTeamMemberForm', [ + 'email' => 'test@example.com', + 'role' => 'admin', + ])->call('addTeamMember'); $invitationId = $user->currentTeam->fresh()->teamInvitations->first()->id; diff --git a/stubs/tests/livewire/LeaveTeamTest.php b/stubs/tests/livewire/LeaveTeamTest.php index 05f55c90d..68e69e604 100644 --- a/stubs/tests/livewire/LeaveTeamTest.php +++ b/stubs/tests/livewire/LeaveTeamTest.php @@ -23,7 +23,7 @@ public function test_users_can_leave_teams(): void $this->actingAs($otherUser); $component = Livewire::test(TeamMemberManager::class, ['team' => $user->currentTeam]) - ->call('leaveTeam'); + ->call('leaveTeam'); $this->assertCount(0, $user->currentTeam->fresh()->users); } @@ -33,8 +33,8 @@ public function test_team_owners_cant_leave_their_own_team(): void $this->actingAs($user = User::factory()->withPersonalTeam()->create()); $component = Livewire::test(TeamMemberManager::class, ['team' => $user->currentTeam]) - ->call('leaveTeam') - ->assertHasErrors(['team']); + ->call('leaveTeam') + ->assertHasErrors(['team']); $this->assertNotNull($user->currentTeam->fresh()); } diff --git a/stubs/tests/livewire/ProfileInformationTest.php b/stubs/tests/livewire/ProfileInformationTest.php index e1aa766e2..ce1a8e7de 100644 --- a/stubs/tests/livewire/ProfileInformationTest.php +++ b/stubs/tests/livewire/ProfileInformationTest.php @@ -27,8 +27,8 @@ public function test_profile_information_can_be_updated(): void $this->actingAs($user = User::factory()->create()); Livewire::test(UpdateProfileInformationForm::class) - ->set('state', ['name' => 'Test Name', 'email' => 'test@example.com']) - ->call('updateProfileInformation'); + ->set('state', ['name' => 'Test Name', 'email' => 'test@example.com']) + ->call('updateProfileInformation'); $this->assertEquals('Test Name', $user->fresh()->name); $this->assertEquals('test@example.com', $user->fresh()->email); diff --git a/stubs/tests/livewire/RemoveTeamMemberTest.php b/stubs/tests/livewire/RemoveTeamMemberTest.php index 37fc36700..cdd500f4a 100644 --- a/stubs/tests/livewire/RemoveTeamMemberTest.php +++ b/stubs/tests/livewire/RemoveTeamMemberTest.php @@ -21,8 +21,8 @@ public function test_team_members_can_be_removed_from_teams(): void ); $component = Livewire::test(TeamMemberManager::class, ['team' => $user->currentTeam]) - ->set('teamMemberIdBeingRemoved', $otherUser->id) - ->call('removeTeamMember'); + ->set('teamMemberIdBeingRemoved', $otherUser->id) + ->call('removeTeamMember'); $this->assertCount(0, $user->currentTeam->fresh()->users); } @@ -38,8 +38,8 @@ public function test_only_team_owner_can_remove_team_members(): void $this->actingAs($otherUser); $component = Livewire::test(TeamMemberManager::class, ['team' => $user->currentTeam]) - ->set('teamMemberIdBeingRemoved', $user->id) - ->call('removeTeamMember') - ->assertStatus(403); + ->set('teamMemberIdBeingRemoved', $user->id) + ->call('removeTeamMember') + ->assertStatus(403); } } diff --git a/stubs/tests/livewire/TwoFactorAuthenticationSettingsTest.php b/stubs/tests/livewire/TwoFactorAuthenticationSettingsTest.php index 6e5fc09be..686bb028a 100644 --- a/stubs/tests/livewire/TwoFactorAuthenticationSettingsTest.php +++ b/stubs/tests/livewire/TwoFactorAuthenticationSettingsTest.php @@ -26,7 +26,7 @@ public function test_two_factor_authentication_can_be_enabled(): void $this->withSession(['auth.password_confirmed_at' => time()]); Livewire::test(TwoFactorAuthenticationForm::class) - ->call('enableTwoFactorAuthentication'); + ->call('enableTwoFactorAuthentication'); $user = $user->fresh(); @@ -47,8 +47,8 @@ public function test_recovery_codes_can_be_regenerated(): void $this->withSession(['auth.password_confirmed_at' => time()]); $component = Livewire::test(TwoFactorAuthenticationForm::class) - ->call('enableTwoFactorAuthentication') - ->call('regenerateRecoveryCodes'); + ->call('enableTwoFactorAuthentication') + ->call('regenerateRecoveryCodes'); $user = $user->fresh(); @@ -71,7 +71,7 @@ public function test_two_factor_authentication_can_be_disabled(): void $this->withSession(['auth.password_confirmed_at' => time()]); $component = Livewire::test(TwoFactorAuthenticationForm::class) - ->call('enableTwoFactorAuthentication'); + ->call('enableTwoFactorAuthentication'); $this->assertNotNull($user->fresh()->two_factor_secret); diff --git a/stubs/tests/livewire/UpdatePasswordTest.php b/stubs/tests/livewire/UpdatePasswordTest.php index c6268f5c0..57dbe2dec 100644 --- a/stubs/tests/livewire/UpdatePasswordTest.php +++ b/stubs/tests/livewire/UpdatePasswordTest.php @@ -18,12 +18,12 @@ public function test_password_can_be_updated(): void $this->actingAs($user = User::factory()->create()); Livewire::test(UpdatePasswordForm::class) - ->set('state', [ - 'current_password' => 'password', - 'password' => 'new-password', - 'password_confirmation' => 'new-password', - ]) - ->call('updatePassword'); + ->set('state', [ + 'current_password' => 'password', + 'password' => 'new-password', + 'password_confirmation' => 'new-password', + ]) + ->call('updatePassword'); $this->assertTrue(Hash::check('new-password', $user->fresh()->password)); } @@ -33,13 +33,13 @@ public function test_current_password_must_be_correct(): void $this->actingAs($user = User::factory()->create()); Livewire::test(UpdatePasswordForm::class) - ->set('state', [ - 'current_password' => 'wrong-password', - 'password' => 'new-password', - 'password_confirmation' => 'new-password', - ]) - ->call('updatePassword') - ->assertHasErrors(['current_password']); + ->set('state', [ + 'current_password' => 'wrong-password', + 'password' => 'new-password', + 'password_confirmation' => 'new-password', + ]) + ->call('updatePassword') + ->assertHasErrors(['current_password']); $this->assertTrue(Hash::check('password', $user->fresh()->password)); } @@ -49,13 +49,13 @@ public function test_new_passwords_must_match(): void $this->actingAs($user = User::factory()->create()); Livewire::test(UpdatePasswordForm::class) - ->set('state', [ - 'current_password' => 'password', - 'password' => 'new-password', - 'password_confirmation' => 'wrong-password', - ]) - ->call('updatePassword') - ->assertHasErrors(['password']); + ->set('state', [ + 'current_password' => 'password', + 'password' => 'new-password', + 'password_confirmation' => 'wrong-password', + ]) + ->call('updatePassword') + ->assertHasErrors(['password']); $this->assertTrue(Hash::check('password', $user->fresh()->password)); } diff --git a/stubs/tests/livewire/UpdateTeamMemberRoleTest.php b/stubs/tests/livewire/UpdateTeamMemberRoleTest.php index 431950662..47c9593fe 100644 --- a/stubs/tests/livewire/UpdateTeamMemberRoleTest.php +++ b/stubs/tests/livewire/UpdateTeamMemberRoleTest.php @@ -21,9 +21,9 @@ public function test_team_member_roles_can_be_updated(): void ); $component = Livewire::test(TeamMemberManager::class, ['team' => $user->currentTeam]) - ->set('managingRoleFor', $otherUser) - ->set('currentRole', 'editor') - ->call('updateRole'); + ->set('managingRoleFor', $otherUser) + ->set('currentRole', 'editor') + ->call('updateRole'); $this->assertTrue($otherUser->fresh()->hasTeamRole( $user->currentTeam->fresh(), 'editor' @@ -41,10 +41,10 @@ public function test_only_team_owner_can_update_team_member_roles(): void $this->actingAs($otherUser); $component = Livewire::test(TeamMemberManager::class, ['team' => $user->currentTeam]) - ->set('managingRoleFor', $otherUser) - ->set('currentRole', 'editor') - ->call('updateRole') - ->assertStatus(403); + ->set('managingRoleFor', $otherUser) + ->set('currentRole', 'editor') + ->call('updateRole') + ->assertStatus(403); $this->assertTrue($otherUser->fresh()->hasTeamRole( $user->currentTeam->fresh(), 'admin' diff --git a/stubs/tests/livewire/UpdateTeamNameTest.php b/stubs/tests/livewire/UpdateTeamNameTest.php index 0aba9eb97..d18f205fb 100644 --- a/stubs/tests/livewire/UpdateTeamNameTest.php +++ b/stubs/tests/livewire/UpdateTeamNameTest.php @@ -17,8 +17,8 @@ public function test_team_names_can_be_updated(): void $this->actingAs($user = User::factory()->withPersonalTeam()->create()); Livewire::test(UpdateTeamNameForm::class, ['team' => $user->currentTeam]) - ->set(['state' => ['name' => 'Test Team']]) - ->call('updateTeamName'); + ->set(['state' => ['name' => 'Test Team']]) + ->call('updateTeamName'); $this->assertCount(1, $user->fresh()->ownedTeams); $this->assertEquals('Test Team', $user->currentTeam->fresh()->name);