[WIP] Pick: unit tests for application and zf modules

Cherry-pick bc4516ebc989dc59e80f5d0f108b960fccd21613.

Replaces https://github.com/zendframework/modules.zendframework.com/pull/223.
Blocked by https://github.com/zendframework/modules.zendframework.com/pull/226.