buildView() overrides #58
Unanswered
ilkermutlu
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been using standard Laravel mailables in my project and had a couple of tests asserting some string in the mailable HTML like
After migrating my mailables to this package, this assertion started erroring with:
After some digging, I see that the original
buildView()
method is as follows:And the corresponding part of the override in the package:
I saw that the
renderTextLayout()
method is already returning consistently with the original method signature:So, I tried replacing
'text' => new HtmlString($text) ?? null
with'text' => $text
and got the tests passing.Considering
renderTextLayout()
will always return null when there is no text template (which is optional), any assertion on the html template will generate this same error.I am not yet sure about further side effects of the change I made, therefore not submitting a PR.
I'd appreciate any insight into this.
Beta Was this translation helpful? Give feedback.
All reactions