Files
2026-10-09 08:21:06 +02:00

59 lines
1.6 KiB
PHP

<?php
test('install start page is displayed', function () {
$this->get('install')
->assertOk()
->assertViewIs('install.start');
});
test('requirements page is displayed', function () {
$this->get('install/requirements')
->assertOk()
->assertViewIs('install.requirements')
->assertViewHas('requirements')
->assertViewHas('allLoaded');
});
test('permissions page redirects when requirements not met', function () {
// Hard to fake unmet requirements, so just verify the route is reachable.
$response = $this->get('install/permissions');
$this->assertContains(
$response->getStatusCode(),
[200, 302],
'install/permissions should return 200 or redirect to requirements.'
);
});
test('database page redirects when prerequisites not met', function () {
$response = $this->get('install/database');
$this->assertContains(
$response->getStatusCode(),
[200, 302],
'install/database should return 200 or redirect.'
);
});
test('installation redirects with bad db credentials', function () {
$this->post('install/start-installation', [
'host' => '127.0.0.1',
'username' => 'nope',
'password' => 'nope',
'database' => 'nope_no_database',
'prefix' => '',
])->assertRedirect();
});
test('complete page is displayed', function () {
$this->get('install/complete')
->assertOk()
->assertViewIs('install.complete');
});
test('error page is displayed', function () {
$this->get('install/error')
->assertOk()
->assertViewIs('install.error');
});