Implementiere echtes sendmail für den Server. Lokal gibts kein mail und keine outbox mehr
This commit is contained in:
1 parent
6c16e16354
commit
b58d96cd5e
11 files changed
+109
-51
No files matched your search
@@ -11,6 +11,11 @@ function expectSame(string $expected, string $actual, string $message): void
|
||||
}
|
||||
}
|
||||
|
||||
function expectContains(string $needle, string $haystack, string $message): void
|
||||
{
|
||||
if (!str_contains($haystack, $needle)) throw new RuntimeException($message);
|
||||
}
|
||||
|
||||
$configFile = tempnam(sys_get_temp_dir(), 'sufw-booking-config-');
|
||||
if ($configFile === false) throw new RuntimeException('Temporary configuration file could not be created.');
|
||||
|
||||
@@ -27,6 +32,18 @@ try {
|
||||
bookingDatabaseUrl('mysql://environment:secret@database:3306/booking', $configFile),
|
||||
'DATABASE_URL must take precedence over the configuration file.'
|
||||
);
|
||||
expectSame('disabled', bookingMailTransport('disabled'), 'Local mail delivery must be explicitly disabled.');
|
||||
|
||||
$calendar = bookingIcsCalendar([
|
||||
'id' => '44c5d0f9-6c98-4b04-8d25-c32834d21a61',
|
||||
'project' => 'perspektivwerk',
|
||||
'title' => 'Erstgespräch PerspektivWerk',
|
||||
'starts_at' => '2026-09-14 09:00:00',
|
||||
'ends_at' => '2026-09-14 10:00:00',
|
||||
'format' => 'vor_ort',
|
||||
]);
|
||||
expectContains('BEGIN:VCALENDAR', $calendar, 'The confirmation attachment must be an iCalendar document.');
|
||||
expectContains('UID:44c5d0f9-6c98-4b04-8d25-c32834d21a61@sufw-booking', $calendar, 'The iCalendar attachment must contain the event UID.');
|
||||
} finally {
|
||||
unlink($configFile);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user