Tests for #6363

https://github.com/zendframework/zf2/issues/6363