Seems like this would answer your question: https://laracasts.com/discuss/channels/testing/testing-and-apostrophe-characters-in-fields
Mar 18, 2018
2
Level 2
Test fails when special characters are used
Hi,
First of all, I'm not english speaker, thus sorry for my language mistakes.
I'm new in PHP and Laravel world so maybe this question is a bit "silly". I'm doing a simple test that just check if a resource show page is rendered correctly.
Let's say that I have a model which has a field called name and it's populated using Faker with a random name, for example, O'Conner which casually has some specials characters.
If I use the method assertSee("O'Conner") of the GET reponse the test fails because the html generated has O' Conner instead of O'Conner.
I looked for a way to fix this problem but I didn't find anything. Any idea how to avoid this behaviour?
Thanks for your time.
Level 6
1 like
Please or to participate in this conversation.