get('/install')->assertOk()->assertSee('Create your business'); $response = $this->post('/install', [ 'businessName' => 'Installed Shop', 'slug' => 'installed-shop', 'domain' => 'localhost', 'adminName' => 'First Owner', 'adminEmail' => 'first-owner@example.test', 'password' => 'password123', 'password_confirmation' => 'password123', ]); $response->assertRedirect(route('install')); $this->assertDatabaseHas('ApplicationInstallation', ['id' => 'singleton', 'status' => 'INSTALLED']); $this->assertDatabaseHas('Business', ['slug' => 'installed-shop']); $this->assertDatabaseHas('User', ['email' => 'first-owner@example.test']); $this->get('/install')->assertRedirect(route('public.home')); $this->assertSame(1, ApplicationInstallation::count()); } }