Skip to content

Testing failure transport #71

@mtret

Description

@mtret

Hi, is there a way of testing whether failed messages end up in a correct failure_transport? Basically what I want to do is something like this:

public function testOrderFailure(): void {
    $this->transport('failed_order')->queue()->assertEmpty();
    $this->transport('async_order')->queue()->assertEmpty();
    $this->transport('async_order')->send(new Envelope(new OrderPaidMessage($this->order))); 
    $this->transport('async_order')->process(); //exception will be thrown

    $this->transport('async_order')->queue()->assertEmpty();
    $this->transport('failed_order')->queue()->assertCount(1);
}

I've got ?catch_exceptions=false configured for the async_order transport-

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions