Yii Framework Forum: Yii2-codeception Missing submodules config on testing - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Yii2-codeception Missing submodules config on testing

#1 User is offline   Ferllings 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 14-November 10

Posted 12 January 2017 - 05:10 AM

I'm trying to use codeception for functional testing, in my yii2-advanced-app (like described here https://github.com/y...tart-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.
0

#2 User is offline   Dmitry Dorogin 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 03-July 17

Posted 04 July 2017 - 04:24 AM

I suppose you missed application configuration.
You must write testing configuration that inherit any application configuration, like console.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users