Problem testing Mailable with assertHasAttachmentFromStorage #47777
Unanswered
michaelklopf
asked this question in
Q&A
Replies: 2 comments
-
I'm having the same issue. For now I'll just build assertions for the |
Beta Was this translation helpful? Give feedback.
0 replies
-
I can confirm it, also have this problem.
i think this is the part where the failure is:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I have a problem with testing a mailable that attaches an attachment from Storage. Like this
The mailable has an assertion for this, so the test does
This always returns
The assertion is stepping through a couple methods in the Illuminate/Mail/Mailable.php.
hasAttachmentFromStorageDisk()
is checking in the$this->diskAttachments
for the attachments. But this is never set.diskAttachments
is set in theattachFromStorageDisk
function, which is called by theattachFromStorage
function. This function is nowhere used though, especially not by me. I guess I should do something like$mailable->attachFromStorage
?Which leads me to believe, either I'm wrong in how I read the docs and how to use mailables, or the docs are incomplete.
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions