Yii2模块未配置! -选项:configFile是必需的错误-代码接收

问题描述 投票:0回答:1

Yii2模块未配置! -选项:configFile是必需的错误,编码接收yii2错误如何解决错误?我有

suites:
    unit:
        #        path: .
        path: common
        actor: UnitTester
        modules:
            enabled:
                # add more modules here
                - Asserts
                - Yii2
settings:
    shuffle: true
    lint: true
    bootstrap: tests/_bootstrap.php
paths:
    tests: .
    output: common/_output
    support: common/_support
    data: common
modules:
    enabled:
        # add more modules here
        #- Asserts
        - Yii2
php yii2 codeception
1个回答
0
投票

我自己对它进行排序,因为没有找到答案。常规模块项设置必须具有配置形式-子项必须命名为“ config”而不是“ enabled”,以便能够在其他地方使用,例如套件-单元,并引用提供或生成的配置文件通过基本的Yii2模板

modules:
  config:
    Yii2:
      configFile: 'config/test.php'

在全文中可见

suites:
    unit:
#        path: .
        path: common
        actor: UnitTester
        modules:
            enabled:
                # add more modules here
                - Asserts
                - Yii2
settings:
    shuffle: true
    lint: true
    bootstrap: tests/_bootstrap.php
paths:
    tests: .
    output: common/_output
    support: common/_support
    data: common
modules:
  config:
    Yii2:
      configFile: 'config/test.php'

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.