CluPilotCloud/resources
nexxo 92bcdcd186
tests / pest (push) Failing after 7m32s Details
tests / assets (push) Successful in 22s Details
tests / release (push) Has been skipped Details
Send the invoice with the invoice attached
The PDF is rendered when the mail goes out rather than fetched from anywhere,
because nothing stores it — and rendering from the frozen snapshot means the
attachment is the document as issued no matter when the queue gets to it or how
often it retries. fromData rather than fromPath: there is no path.

Three attempts at testing it, and the first two were wrong in ways worth
recording. Attachment::$data does not exist — the closure lives in a protected
$resolver, and reaching for it was me testing the framework's internals rather
than my own code. And a byte comparison of the PDF cannot work at all: TCPDF
embeds a creation time and a document id, so two renders of one invoice differ.

Split into the two things that can actually go wrong. The mail carries an
attachment with the right filename and type — that is metadata, and it is
asserted as metadata. And the renderer produces a real PDF rather than an empty
one, asserted where the renderer is, because an attachment closure that returns
nothing still makes a perfectly valid mail with a nought-byte file on it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 02:13:41 +02:00
..
css Match the panel to the approved template, measured rather than assumed 2026-07-27 17:08:05 +02:00
js Answer a check at once, start an update at once, and count down to neither 2026-07-28 22:25:07 +02:00
views Send the invoice with the invoice attached 2026-07-29 02:13:41 +02:00