U-D/U-E/O5: Prozess-Tester im eigenen Prozess (standardmäßig gesperrt, 15 Negativtests, statischer Wächter), Szenarien und Bericht, Kanalereignisse (API-Eingang ohne Umbau von iCal/Mail), Abschluss nach finanzieller Klärung, Löschfrist 30 Tage
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c255783cec
commit
0689c0a591
68 files changed
+3350
-35
No files matched your search
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace App\Process\Tester\Scenarios;
|
||||
|
||||
use App\Enums\IntakeKind;
|
||||
use App\Process\Tester\SandboxContext;
|
||||
use Illuminate\Mail\Events\MessageSending;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Symfony\Component\Mailer\Exception\TransportException;
|
||||
|
||||
/**
|
||||
* S12: the mail server fails when the request comes in – the case must be kept and show a defined state (the real
|
||||
* error type of the transport, no crash). The failure is simulated where every mail passes (MessageSending), without a
|
||||
* transport of its own.
|
||||
*/
|
||||
final class CommunicationFailure extends Scenario
|
||||
{
|
||||
public static function key(): string
|
||||
{
|
||||
return 'mail_failure';
|
||||
}
|
||||
|
||||
public static function label(): string
|
||||
{
|
||||
return 'Mailversand fällt aus';
|
||||
}
|
||||
|
||||
public static function description(): string
|
||||
{
|
||||
return 'Beim Eingang der Anfrage ist der Mailserver nicht erreichbar. Der Vorgang bleibt erhalten und zeigt, was von Hand zu tun ist.';
|
||||
}
|
||||
|
||||
public static function intakes(): array
|
||||
{
|
||||
return [IntakeKind::Inquiry];
|
||||
}
|
||||
|
||||
public function events(array $inputs): array
|
||||
{
|
||||
return [
|
||||
new ScenarioEvent('Mailserver fällt aus', function (SandboxContext $context): void {
|
||||
Event::listen(MessageSending::class, function (): void {
|
||||
throw new TransportException('Verbindung zum Mailserver fehlgeschlagen (simuliert).');
|
||||
});
|
||||
}),
|
||||
new ScenarioEvent('Gast fragt mit allen Angaben an', fn (SandboxContext $context) => $context->request(['street' => 'Teststraße 1', 'postal_code' => '18225', 'city' => 'Kühlungsborn', 'country' => 'DE'])),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user