V
V
Vocler2019-08-21 00:54:35
Yii
Vocler, 2019-08-21 00:54:35

How to specify the path to a higher level in the yii2 module for codeception?

I have the following project structure

|-app
|-- config
|--- test.php
|-- Modules
|--- MyModule
|---- codeception.yml //Тут тесты для модуля MyModule
|---- tests
|-- tests //Тут тесты для приложения
|-- codeception.yml

app/codeception.ymllooks like this:
actor: Tester
include:
    - modules/*
paths:
    tests: tests
    log: tests/_output
    data: tests/_data
    helpers: tests/_support
settings:
    bootstrap: _bootstrap.php
    memory_limit: 1024M
    colors: true
modules:
    config:
        Yii2:
            configFile: 'config/test.php'

Those. it loads Yii2 config from config/test.php.
Problems arose with app/modules/MyModule/codeception.yml. Now he looks like this.
namespace: test
actor: Tester
paths:
    tests: tests
    log: tests/_output
    data: tests/_data
    helpers: tests/_support
settings:
    bootstrap: _bootstrap.php
    memory_limit: 1024M
    colors: true
modules:
    config:
        Yii2:
            configFile: 'config/test.php'

And of course looking for a config in app/modules/MyModule/config/codeception.yml.
I tried to replace the line from configFile to
configFile: '/../config/test.php'
However, in this case I get an error
The application config file does not exist: app/modules/MyModule/../config/test.php

How to specify the path for the config to a higher level codeception.yml?
Is there a way to force all codeception.ymlmodule files to inherit the Yii2 module from the global codeception.ymlone so as not to duplicate the code?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question