Acki's avatar
Level 1

Laravel unable to read embedded file during unit test on gitlab ci

Hi laracast,

first of all .. I'm very sorry for my rusty english. :D

I've been playing around with setting up my unit test for 2 days now, but I'm unable to embed an image in my html - mail. In my dev-environment on my mac there is no problem for phpunit to send an email with the this image attached, so it must be related to my docker-ci environment. I've updated all my components up to the latest version (docker / gitlab environment as well as laravel 8) but it doesn't help.

Within my gitlab.env file I've set up the mail driver to log and I can find another email within my logs but my "image mail" ends up with this message:

Unable to open file for reading [http://127.0.0.1/img/glove.svg]

I've also tried this app urls but none works:

<img src="{{ $message->embed(asset('img/globe.svg')) }}" alt="">

Shall I create an if-block around my image so that the code isn't called during my CI - test or is there an other option?

I'm really looking forward to an answer and if you need more information about my environment, please let me know.

Thanks, Christian

0 likes
0 replies

Please or to participate in this conversation.