Fix/issue 398

Fixes #398 .

The solution for testing is not very good , regarding on the trick for EntityType. Doing this in this way to avoid the use of doctrine bridge bundle configuration changement, mocking a lot of object,..).