extended from codeception testcase, added docs

This PR is for this issue https://github.com/yiisoft/yii2/issues/1600. Can be reviewed.