CakePHP internationalization

137 Views Asked by At

How to handle internationalization in cakephp 3 when doing unit testing ? In my case I need to do assertResponseContains('Tilføj') which contains 'ø' character and for some reason phpunit cant read it properly, therefore the test fails even though the response contains the given word. Any suggestions ? .

1

There are 1 best solutions below

0
On BEST ANSWER

I have found the solution. I was actually running the test from a command line that was not able to display correctly the "Ø" letter. So the solution was actually to change the code page of the terminal to UTF-8 with chcp 65001 icommand