0
votes

So I am just getting started with Codeception (I know, I am late to the game) and Yii2. There is a error I am running into that I don't seem to get fixed.

Problem

  1. When I run 'codecept run', I get the error 'Error with message "Class yii\codeception\TestCase not found". Which is strange to me, because when I look for TestCases, I can find multiple TestCases! F.e. in the folders "backend", "console", ..

Information

  • Codeception has been installed Globally
  • The CodeCeption version I am using is the version 4.1.12
  • When I run any command, the console is giving me the message, "Redirecting to Composer-installed version in vendor/codeception".

What am I doing wrong?

If you guys need any information, hit me up!

Thanks!

1
Hi and welcome. Please share your code and describe what you have tried in more detail - KargWare

1 Answers

0
votes

Why do you use yii\codeception\TestCase class in your tests? Have you found it in old tutorial?

yii\codeception\TestCase class was provided by yiisoft/yii2-codeception package which was abandoned back in 2016.

Use Cest format as documented in https://codeception.com/docs/02-GettingStarted#Writing-a-Sample-Test