Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

yii2 codeception doesn't generate unit suit

I red a ton of documentation and posts and it seems that almost everyone has problems with those yii2 codeception tests. My problem is that when I try to generate unit suit ./vendor/bin/codecept generate:test unit Login I get an error

In Configuration.php line 306:  Suite unit was not loaded

What can cause this ? Have not found answer anywhere. Thank you!

EDIT - unit.suite.yml

suite_namespace: backend\tests\unit
suite_class: UnitTester
actor: UnitTester
modules:
    enabled:
        - Yii2:
            part: [orm, email, fixtures]
        - Asserts
like image 338
Toma Tomov Avatar asked Jul 27 '26 06:07

Toma Tomov


1 Answers

The suite has to be specified. To specify it use -c backend

And the whole command should be:

./vendor/bin/codecept generate:test unit Login -c backend
like image 74
tsanchev Avatar answered Jul 30 '26 08:07

tsanchev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!