Testing
Testing Ecotone messaging in Tempest applications
Test Mode and the Production Cache
return new EcotoneConfig(
test: true,
);Flow Testing without Tempest
$mailer = new class implements Mailer {
public array $subjects = [];
public function send(Email $email): void
{
$this->subjects[] = $email instanceof GenericEmail ? (string) $email->subject : '';
}
};
$ecotone = EcotoneLite::bootstrapFlowTesting(
classesToResolve: [OrderConfirmationWorkflow::class, EnrichingStub::class],
containerOrAvailableServices: [
new OrderConfirmationWorkflow(),
new EnrichingStub(),
Mailer::class => $mailer,
],
enableAsynchronousProcessing: [
SimpleMessageChannelBuilder::createQueueChannel('notifications', delayable: true),
],
);Testing Delayed Messages with Time Travel
Testing the Failure Path
Integration Tests that Boot Tempest
Last updated
Was this helpful?