Test for #6585

test for [#6585](https://github.com/zendframework/zf2/issues/6585)