Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve “Setting Up Tests” #472

Open
alexkuzmin opened this issue Feb 10, 2023 · 2 comments
Open

Improve “Setting Up Tests” #472

alexkuzmin opened this issue Feb 10, 2023 · 2 comments

Comments

@alexkuzmin
Copy link

alexkuzmin commented Feb 10, 2023

Maybe there is an error somewhere in https://craftcms.com/docs/4.x/testing/testing-craft/setup.html. I've made all the steps several times, and when I run codecept run unit, it thows an error: Fatal error: Uncaught Error: Class "Codeception\Module\Yii2" not found in /var/www/project/vendor/craftcms/cms/src/test/Craft.php:65.

Also, it seems that in codeception.yml under the paths block should be added the line: output: tests/_output.

Craft version: 4.3.8.2
PHP version: 8.1.14
Database driver & version: PostgreSQL 13.8
Codeception: 5.0.8

@alexkuzmin
Copy link
Author

What helped me to make it work:
composer require --dev codeception/module-yii2
then again vendor/bin/codecept build
also, in .env-File in root: ALLOW_ADMIN_CHANGES=true

@AugustMiller
Copy link
Contributor

As noted in #453:

We are pausing on testing docs while we evaluate Pest as an option, going forward.

Sorry for the lack of movement, here! I will make a note about this conversation on the relevant pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants