jrdi's avatar
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.

0 likes
2 replies
jrdi's avatar
Level 2

Yes! This fix the problem. Thanks!!

Please or to participate in this conversation.