Yii2-codeception Missing submodules config on testing

I’m trying to use codeception for functional testing, in my yii2-advanced-app (like described here https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide/start-testing.md)

The testing works fine with no dependencies, but when I add a sub module, like yii2-user (https://github.com/dektrium/yii2-user), it doesn’t seems to load the module bootstrap settings:


yii\base\InvalidParamException: Invalid path alias: @dektrium/user/views in /app/vendor/yiisoft/yii2/BaseYii.php:152

The module is declared in config/main.php


<?php

$params = array_merge(

require(__DIR__ . '/../../common/config/params.php'),

require(__DIR__ . '/../../common/config/params-local.php'),

require(__DIR__ . '/params.php'),

require(__DIR__ . '/params-local.php')

);


return [

  'modules' => [

    'user' => [

        'class' => 'dektrium\user\Module',

...

And loaded from config/test.php:


<?php

return yii\helpers\ArrayHelper::merge(

  require(__DIR__ . '/main.php'),

...

Am I forgetting something?

Thanks for your help.

I suppose you missed application configuration.

You must write testing configuration that inherit any application configuration, like console.