Fix / tests for #6363

https://github.com/zendframework/zf2/issues/6363
@samsonasik I've just updated the file. Thank you