What is the failure message that you are getting?
[L5.1] Test fails but it's ok using the browser
I've written the following test
The test fails with:
Failed asserting that '[HTML code of the page]' matches PCRE pattern "/My first post/i".
Further details
Obviously string My first post does not appear in '[HTML code of the page]' message
but if I do the same operation by hand with the browser the string appears and everything works.
and obviously phpunit manages to save the status into the DB successfully
Can you help me?
Judging from your previous question https://laracasts.com/discuss/channels/testing/l51-model-factories-and-relationships It sounds like your tests are suffering from a bug that allows factory definitions to create relationships even though they have been overridden. I've raised this issue at github https://github.com/laravel/framework/issues/9245 but more people should chime in there if we want this to be addressed.
Please or to participate in this conversation.