Bugfixing invalid PHPUnit tests