W
W
webviewer2018-08-25 07:01:55
Yii
webviewer, 2018-08-25 07:01:55

How to properly set up autoloader in codecption?

Installed the latest version of codeception in Yii2
This codeception.yml config

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:
            cleanup: false

And such a common _bootstrap.php
<?php
define('YII_ENV', 'test');
defined('YII_DEBUG') or define('YII_DEBUG', true);

require_once __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
require __DIR__ .'/../vendor/autoload.php';

And when you try to call any class in a unit test - similar errors Tell me what's wrong
[Error] Class app\model\User not found

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