PHP Rebuild
CI / ci (push) Canceled after 0s

Initial PHP rebuild of the app
This commit is contained in:
Stefan Lazic committed 2026-09-05 08:21:33 +01:00
1 parent 8a2b211069
commit 2ef3654841
690 files changed
+33944 -12046

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
<?php
namespace Tests\Feature;
use App\Models\ApplicationInstallation;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class InstallationTest extends TestCase
{
use RefreshDatabase;
public function test_a_clean_database_can_be_installed_once(): void
{
$this->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());
}
}