Added test based on https://github.com/Ocramius/doctrine2/commit/e468ced00bd107f40fd08beca4c7cc5a2492a418
Added constant
[DDC-2346] Reapply changes lost in rebase onto 2.3