Hotfix/php unit failing

Fix various phpunit failures.

- Incomplete renaming during b27aab3
- Missing eof_ending in exception

**Please do not merge yet! Let's look if Travis is OK after this and fix all remaining failures first!**