Fixed tests on Windows: changed "\n" -> PHP_EOL

New lines are represented by "\r\n" characters on Windows so tests relying on "\n" are failing.