[DDC-2931] testcase to reproduce Jira 2931

This is a unit test to reproduce Jira 2931 http://www.doctrine-project.org/jira/browse/DDC-2931