mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
Add PHP type hints for Laravel 10
This commit is contained in:
committed by
HolgerHatGarKeineNode
parent
ad55c69b51
commit
98a430c91c
@@ -14,7 +14,7 @@ class ApiTokenPermissionsTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_api_token_permissions_can_be_updated()
|
||||
public function test_api_token_permissions_can_be_updated(): void
|
||||
{
|
||||
if (! Features::hasApiFeatures()) {
|
||||
return $this->markTestSkipped('API support is not enabled.');
|
||||
|
||||
@@ -11,14 +11,14 @@ class AuthenticationTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_login_screen_can_be_rendered()
|
||||
public function test_login_screen_can_be_rendered(): void
|
||||
{
|
||||
$response = $this->get('/login');
|
||||
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
public function test_users_can_authenticate_using_the_login_screen()
|
||||
public function test_users_can_authenticate_using_the_login_screen(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
|
||||
@@ -31,7 +31,7 @@ class AuthenticationTest extends TestCase
|
||||
$response->assertRedirect(RouteServiceProvider::HOME);
|
||||
}
|
||||
|
||||
public function test_users_can_not_authenticate_with_invalid_password()
|
||||
public function test_users_can_not_authenticate_with_invalid_password(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ class BrowserSessionsTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_other_browser_sessions_can_be_logged_out()
|
||||
public function test_other_browser_sessions_can_be_logged_out(): void
|
||||
{
|
||||
$this->actingAs($user = User::factory()->create());
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class CreateApiTokenTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_api_tokens_can_be_created()
|
||||
public function test_api_tokens_can_be_created(): void
|
||||
{
|
||||
if (! Features::hasApiFeatures()) {
|
||||
return $this->markTestSkipped('API support is not enabled.');
|
||||
|
||||
@@ -12,7 +12,7 @@ class CreateTeamTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_teams_can_be_created()
|
||||
public function test_teams_can_be_created(): void
|
||||
{
|
||||
$this->actingAs($user = User::factory()->withPersonalTeam()->create());
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class DeleteAccountTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_user_accounts_can_be_deleted()
|
||||
public function test_user_accounts_can_be_deleted(): void
|
||||
{
|
||||
if (! Features::hasAccountDeletionFeatures()) {
|
||||
return $this->markTestSkipped('Account deletion is not enabled.');
|
||||
@@ -28,7 +28,7 @@ class DeleteAccountTest extends TestCase
|
||||
$this->assertNull($user->fresh());
|
||||
}
|
||||
|
||||
public function test_correct_password_must_be_provided_before_account_can_be_deleted()
|
||||
public function test_correct_password_must_be_provided_before_account_can_be_deleted(): void
|
||||
{
|
||||
if (! Features::hasAccountDeletionFeatures()) {
|
||||
return $this->markTestSkipped('Account deletion is not enabled.');
|
||||
|
||||
@@ -14,7 +14,7 @@ class DeleteApiTokenTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_api_tokens_can_be_deleted()
|
||||
public function test_api_tokens_can_be_deleted(): void
|
||||
{
|
||||
if (! Features::hasApiFeatures()) {
|
||||
return $this->markTestSkipped('API support is not enabled.');
|
||||
|
||||
@@ -13,7 +13,7 @@ class DeleteTeamTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_teams_can_be_deleted()
|
||||
public function test_teams_can_be_deleted(): void
|
||||
{
|
||||
$this->actingAs($user = User::factory()->withPersonalTeam()->create());
|
||||
|
||||
@@ -32,7 +32,7 @@ class DeleteTeamTest extends TestCase
|
||||
$this->assertCount(0, $otherUser->fresh()->teams);
|
||||
}
|
||||
|
||||
public function test_personal_teams_cant_be_deleted()
|
||||
public function test_personal_teams_cant_be_deleted(): void
|
||||
{
|
||||
$this->actingAs($user = User::factory()->withPersonalTeam()->create());
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class EmailVerificationTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_email_verification_screen_can_be_rendered()
|
||||
public function test_email_verification_screen_can_be_rendered(): void
|
||||
{
|
||||
if (! Features::enabled(Features::emailVerification())) {
|
||||
return $this->markTestSkipped('Email verification not enabled.');
|
||||
@@ -28,7 +28,7 @@ class EmailVerificationTest extends TestCase
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
public function test_email_can_be_verified()
|
||||
public function test_email_can_be_verified(): void
|
||||
{
|
||||
if (! Features::enabled(Features::emailVerification())) {
|
||||
return $this->markTestSkipped('Email verification not enabled.');
|
||||
@@ -52,7 +52,7 @@ class EmailVerificationTest extends TestCase
|
||||
$response->assertRedirect(RouteServiceProvider::HOME.'?verified=1');
|
||||
}
|
||||
|
||||
public function test_email_can_not_verified_with_invalid_hash()
|
||||
public function test_email_can_not_verified_with_invalid_hash(): void
|
||||
{
|
||||
if (! Features::enabled(Features::emailVerification())) {
|
||||
return $this->markTestSkipped('Email verification not enabled.');
|
||||
|
||||
@@ -12,7 +12,7 @@ class ExampleTest extends TestCase
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test_the_application_returns_a_successful_response()
|
||||
public function test_the_application_returns_a_successful_response(): void
|
||||
{
|
||||
$response = $this->get('/');
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class InviteTeamMemberTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_team_members_can_be_invited_to_team()
|
||||
public function test_team_members_can_be_invited_to_team(): void
|
||||
{
|
||||
if (! Features::sendsTeamInvitations()) {
|
||||
return $this->markTestSkipped('Team invitations not enabled.');
|
||||
@@ -36,7 +36,7 @@ class InviteTeamMemberTest extends TestCase
|
||||
$this->assertCount(1, $user->currentTeam->fresh()->teamInvitations);
|
||||
}
|
||||
|
||||
public function test_team_member_invitations_can_be_cancelled()
|
||||
public function test_team_member_invitations_can_be_cancelled(): void
|
||||
{
|
||||
if (! Features::sendsTeamInvitations()) {
|
||||
return $this->markTestSkipped('Team invitations not enabled.');
|
||||
|
||||
@@ -12,7 +12,7 @@ class LeaveTeamTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_users_can_leave_teams()
|
||||
public function test_users_can_leave_teams(): void
|
||||
{
|
||||
$user = User::factory()->withPersonalTeam()->create();
|
||||
|
||||
@@ -28,7 +28,7 @@ class LeaveTeamTest extends TestCase
|
||||
$this->assertCount(0, $user->currentTeam->fresh()->users);
|
||||
}
|
||||
|
||||
public function test_team_owners_cant_leave_their_own_team()
|
||||
public function test_team_owners_cant_leave_their_own_team(): void
|
||||
{
|
||||
$this->actingAs($user = User::factory()->withPersonalTeam()->create());
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ class PasswordConfirmationTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_confirm_password_screen_can_be_rendered()
|
||||
public function test_confirm_password_screen_can_be_rendered(): void
|
||||
{
|
||||
$user = User::factory()->withPersonalTeam()->create();
|
||||
|
||||
@@ -19,7 +19,7 @@ class PasswordConfirmationTest extends TestCase
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
public function test_password_can_be_confirmed()
|
||||
public function test_password_can_be_confirmed(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
|
||||
@@ -31,7 +31,7 @@ class PasswordConfirmationTest extends TestCase
|
||||
$response->assertSessionHasNoErrors();
|
||||
}
|
||||
|
||||
public function test_password_is_not_confirmed_with_invalid_password()
|
||||
public function test_password_is_not_confirmed_with_invalid_password(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class PasswordResetTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_reset_password_link_screen_can_be_rendered()
|
||||
public function test_reset_password_link_screen_can_be_rendered(): void
|
||||
{
|
||||
if (! Features::enabled(Features::resetPasswords())) {
|
||||
return $this->markTestSkipped('Password updates are not enabled.');
|
||||
@@ -24,7 +24,7 @@ class PasswordResetTest extends TestCase
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
public function test_reset_password_link_can_be_requested()
|
||||
public function test_reset_password_link_can_be_requested(): void
|
||||
{
|
||||
if (! Features::enabled(Features::resetPasswords())) {
|
||||
return $this->markTestSkipped('Password updates are not enabled.');
|
||||
@@ -41,7 +41,7 @@ class PasswordResetTest extends TestCase
|
||||
Notification::assertSentTo($user, ResetPassword::class);
|
||||
}
|
||||
|
||||
public function test_reset_password_screen_can_be_rendered()
|
||||
public function test_reset_password_screen_can_be_rendered(): void
|
||||
{
|
||||
if (! Features::enabled(Features::resetPasswords())) {
|
||||
return $this->markTestSkipped('Password updates are not enabled.');
|
||||
@@ -64,7 +64,7 @@ class PasswordResetTest extends TestCase
|
||||
});
|
||||
}
|
||||
|
||||
public function test_password_can_be_reset_with_valid_token()
|
||||
public function test_password_can_be_reset_with_valid_token(): void
|
||||
{
|
||||
if (! Features::enabled(Features::resetPasswords())) {
|
||||
return $this->markTestSkipped('Password updates are not enabled.');
|
||||
|
||||
@@ -12,7 +12,7 @@ class ProfileInformationTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_current_profile_information_is_available()
|
||||
public function test_current_profile_information_is_available(): void
|
||||
{
|
||||
$this->actingAs($user = User::factory()->create());
|
||||
|
||||
@@ -22,7 +22,7 @@ class ProfileInformationTest extends TestCase
|
||||
$this->assertEquals($user->email, $component->state['email']);
|
||||
}
|
||||
|
||||
public function test_profile_information_can_be_updated()
|
||||
public function test_profile_information_can_be_updated(): void
|
||||
{
|
||||
$this->actingAs($user = User::factory()->create());
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ class RegistrationTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_registration_screen_can_be_rendered()
|
||||
public function test_registration_screen_can_be_rendered(): void
|
||||
{
|
||||
if (! Features::enabled(Features::registration())) {
|
||||
return $this->markTestSkipped('Registration support is not enabled.');
|
||||
@@ -23,7 +23,7 @@ class RegistrationTest extends TestCase
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
public function test_registration_screen_cannot_be_rendered_if_support_is_disabled()
|
||||
public function test_registration_screen_cannot_be_rendered_if_support_is_disabled(): void
|
||||
{
|
||||
if (Features::enabled(Features::registration())) {
|
||||
return $this->markTestSkipped('Registration support is enabled.');
|
||||
@@ -34,7 +34,7 @@ class RegistrationTest extends TestCase
|
||||
$response->assertStatus(404);
|
||||
}
|
||||
|
||||
public function test_new_users_can_register()
|
||||
public function test_new_users_can_register(): void
|
||||
{
|
||||
if (! Features::enabled(Features::registration())) {
|
||||
return $this->markTestSkipped('Registration support is not enabled.');
|
||||
|
||||
@@ -12,7 +12,7 @@ class RemoveTeamMemberTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_team_members_can_be_removed_from_teams()
|
||||
public function test_team_members_can_be_removed_from_teams(): void
|
||||
{
|
||||
$this->actingAs($user = User::factory()->withPersonalTeam()->create());
|
||||
|
||||
@@ -27,7 +27,7 @@ class RemoveTeamMemberTest extends TestCase
|
||||
$this->assertCount(0, $user->currentTeam->fresh()->users);
|
||||
}
|
||||
|
||||
public function test_only_team_owner_can_remove_team_members()
|
||||
public function test_only_team_owner_can_remove_team_members(): void
|
||||
{
|
||||
$user = User::factory()->withPersonalTeam()->create();
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class TwoFactorAuthenticationSettingsTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_two_factor_authentication_can_be_enabled()
|
||||
public function test_two_factor_authentication_can_be_enabled(): void
|
||||
{
|
||||
if (! Features::canManageTwoFactorAuthentication()) {
|
||||
return $this->markTestSkipped('Two factor authentication is not enabled.');
|
||||
@@ -32,7 +32,7 @@ class TwoFactorAuthenticationSettingsTest extends TestCase
|
||||
$this->assertCount(8, $user->recoveryCodes());
|
||||
}
|
||||
|
||||
public function test_recovery_codes_can_be_regenerated()
|
||||
public function test_recovery_codes_can_be_regenerated(): void
|
||||
{
|
||||
if (! Features::canManageTwoFactorAuthentication()) {
|
||||
return $this->markTestSkipped('Two factor authentication is not enabled.');
|
||||
@@ -54,7 +54,7 @@ class TwoFactorAuthenticationSettingsTest extends TestCase
|
||||
$this->assertCount(8, array_diff($user->recoveryCodes(), $user->fresh()->recoveryCodes()));
|
||||
}
|
||||
|
||||
public function test_two_factor_authentication_can_be_disabled()
|
||||
public function test_two_factor_authentication_can_be_disabled(): void
|
||||
{
|
||||
if (! Features::canManageTwoFactorAuthentication()) {
|
||||
return $this->markTestSkipped('Two factor authentication is not enabled.');
|
||||
|
||||
@@ -13,7 +13,7 @@ class UpdatePasswordTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_password_can_be_updated()
|
||||
public function test_password_can_be_updated(): void
|
||||
{
|
||||
$this->actingAs($user = User::factory()->create());
|
||||
|
||||
@@ -28,7 +28,7 @@ class UpdatePasswordTest extends TestCase
|
||||
$this->assertTrue(Hash::check('new-password', $user->fresh()->password));
|
||||
}
|
||||
|
||||
public function test_current_password_must_be_correct()
|
||||
public function test_current_password_must_be_correct(): void
|
||||
{
|
||||
$this->actingAs($user = User::factory()->create());
|
||||
|
||||
@@ -44,7 +44,7 @@ class UpdatePasswordTest extends TestCase
|
||||
$this->assertTrue(Hash::check('password', $user->fresh()->password));
|
||||
}
|
||||
|
||||
public function test_new_passwords_must_match()
|
||||
public function test_new_passwords_must_match(): void
|
||||
{
|
||||
$this->actingAs($user = User::factory()->create());
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ class UpdateTeamMemberRoleTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_team_member_roles_can_be_updated()
|
||||
public function test_team_member_roles_can_be_updated(): void
|
||||
{
|
||||
$this->actingAs($user = User::factory()->withPersonalTeam()->create());
|
||||
|
||||
@@ -30,7 +30,7 @@ class UpdateTeamMemberRoleTest extends TestCase
|
||||
));
|
||||
}
|
||||
|
||||
public function test_only_team_owner_can_update_team_member_roles()
|
||||
public function test_only_team_owner_can_update_team_member_roles(): void
|
||||
{
|
||||
$user = User::factory()->withPersonalTeam()->create();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ class UpdateTeamNameTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_team_names_can_be_updated()
|
||||
public function test_team_names_can_be_updated(): void
|
||||
{
|
||||
$this->actingAs($user = User::factory()->withPersonalTeam()->create());
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ class ExampleTest extends TestCase
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test_that_true_is_true()
|
||||
public function test_that_true_is_true(): void
|
||||
{
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user