refactor: auto refactor via rector
This commit is contained in:
@@ -5,7 +5,7 @@ use App\Models\User;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Livewire\Livewire;
|
||||
|
||||
test('password can be updated', function () {
|
||||
test('password can be updated', function (): void {
|
||||
$user = User::factory()->create([
|
||||
'password' => Hash::make('password'),
|
||||
]);
|
||||
@@ -23,7 +23,7 @@ test('password can be updated', function () {
|
||||
expect(Hash::check('new-password', $user->refresh()->password))->toBeTrue();
|
||||
});
|
||||
|
||||
test('correct password must be provided to update password', function () {
|
||||
test('correct password must be provided to update password', function (): void {
|
||||
$user = User::factory()->create([
|
||||
'password' => Hash::make('password'),
|
||||
]);
|
||||
|
||||
@@ -4,13 +4,13 @@ use App\Livewire\Settings\Profile;
|
||||
use App\Models\User;
|
||||
use Livewire\Livewire;
|
||||
|
||||
test('profile page is displayed', function () {
|
||||
test('profile page is displayed', function (): void {
|
||||
$this->actingAs($user = User::factory()->create());
|
||||
|
||||
$this->get('/settings/profile')->assertOk();
|
||||
});
|
||||
|
||||
test('profile information can be updated', function () {
|
||||
test('profile information can be updated', function (): void {
|
||||
$user = User::factory()->create();
|
||||
|
||||
$this->actingAs($user);
|
||||
@@ -29,7 +29,7 @@ test('profile information can be updated', function () {
|
||||
expect($user->email_verified_at)->toBeNull();
|
||||
});
|
||||
|
||||
test('email verification status is unchanged when email address is unchanged', function () {
|
||||
test('email verification status is unchanged when email address is unchanged', function (): void {
|
||||
$user = User::factory()->create();
|
||||
|
||||
$this->actingAs($user);
|
||||
@@ -44,7 +44,7 @@ test('email verification status is unchanged when email address is unchanged', f
|
||||
expect($user->refresh()->email_verified_at)->not->toBeNull();
|
||||
});
|
||||
|
||||
test('user can delete their account', function () {
|
||||
test('user can delete their account', function (): void {
|
||||
$user = User::factory()->create();
|
||||
|
||||
$this->actingAs($user);
|
||||
@@ -61,7 +61,7 @@ test('user can delete their account', function () {
|
||||
expect(auth()->check())->toBeFalse();
|
||||
});
|
||||
|
||||
test('correct password must be provided to delete account', function () {
|
||||
test('correct password must be provided to delete account', function (): void {
|
||||
$user = User::factory()->create();
|
||||
|
||||
$this->actingAs($user);
|
||||
|
||||
@@ -4,7 +4,7 @@ use App\Models\User;
|
||||
use Laravel\Fortify\Features;
|
||||
use Livewire\Livewire;
|
||||
|
||||
beforeEach(function () {
|
||||
beforeEach(function (): void {
|
||||
if (! Features::canManageTwoFactorAuthentication()) {
|
||||
$this->markTestSkipped('Two-factor authentication is not enabled.');
|
||||
}
|
||||
@@ -15,7 +15,7 @@ beforeEach(function () {
|
||||
]);
|
||||
});
|
||||
|
||||
test('two factor settings page can be rendered', function () {
|
||||
test('two factor settings page can be rendered', function (): void {
|
||||
$user = User::factory()->create();
|
||||
|
||||
$this->actingAs($user)
|
||||
@@ -26,7 +26,7 @@ test('two factor settings page can be rendered', function () {
|
||||
->assertSee('Disabled');
|
||||
});
|
||||
|
||||
test('two factor settings page requires password confirmation when enabled', function () {
|
||||
test('two factor settings page requires password confirmation when enabled', function (): void {
|
||||
$user = User::factory()->create();
|
||||
|
||||
$response = $this->actingAs($user)
|
||||
@@ -35,7 +35,7 @@ test('two factor settings page requires password confirmation when enabled', fun
|
||||
$response->assertRedirect(route('password.confirm'));
|
||||
});
|
||||
|
||||
test('two factor settings page returns forbidden response when two factor is disabled', function () {
|
||||
test('two factor settings page returns forbidden response when two factor is disabled', function (): void {
|
||||
config(['fortify.features' => []]);
|
||||
|
||||
$user = User::factory()->create();
|
||||
@@ -47,7 +47,7 @@ test('two factor settings page returns forbidden response when two factor is dis
|
||||
$response->assertForbidden();
|
||||
});
|
||||
|
||||
test('two factor authentication disabled when confirmation abandoned between requests', function () {
|
||||
test('two factor authentication disabled when confirmation abandoned between requests', function (): void {
|
||||
$user = User::factory()->create();
|
||||
|
||||
$user->forceFill([
|
||||
|
||||
Reference in New Issue
Block a user