Set up a fresh Laravel app

This commit is contained in:
Bob Molitor
2025-10-16 14:22:46 +02:00
commit 81a98dd9f4
112 changed files with 17024 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
<?php
namespace Tests\Feature\Auth;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Livewire\Volt\Volt;
use Tests\TestCase;
class RegistrationTest extends TestCase
{
use RefreshDatabase;
public function test_registration_screen_can_be_rendered(): void
{
$response = $this->get(route('register'));
$response->assertStatus(200);
}
public function test_new_users_can_register(): void
{
$response = Volt::test('auth.register')
->set('name', 'Test User')
->set('email', 'test@example.com')
->set('password', 'password')
->set('password_confirmation', 'password')
->call('register');
$response
->assertHasNoErrors()
->assertRedirect(route('dashboard', absolute: false));
$this->assertAuthenticated();
}
}