Antonella's avatar

Larevel 8x: test mail error in phpunit. only in some machines

hi when I launch the feature tests on a different machine than mine. They get the following error:

https://drive.google.com/file/d/13-11as2EhDVnuoFmGeXA3tH5MuGOr5YK/view?usp=sharing

0 likes
6 replies
mcangueiro's avatar

Can you share you test code? Saying that something works on a machine and not in the other is a bit vague.

Antonella's avatar

the problem is the following comparison

if(request()->getHost() === 'prj_laravel.test')

in some cases request()->getHost() prints prj_laravel.test in other localhost and I don't understand on what basis it prints different strings

@mcangueiro

MichalOravec's avatar

@gianmarx Doesn't it bother you that you entered the wrong account on github and you don't have a photo?

mcangueiro's avatar

If you are using something like valet you get a host like that, but what if someone is using a different development environment? For example, if you do:

php artisan serve

your host is changed from that to something like localhost or 127.0.0.1

Are all the machines where you setup this project using the same dev environment?

Please or to participate in this conversation.