Fix bug in tests with old Doctrine 2.1
[GH-38] Port changes from broncha, because they couldnt be seperated cleanly from reformatting errors in the original PR. Closes GH-38