Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Improve “Setting Up Tests”

Open
#472 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
php, postgresql

Research direction

Start with the “Setting Up Tests” page at craftcms.com/docs/4.x/testing/testing-craft/setup.html, then inspect the referenced codeception.yml paths block and Craft.php:65. Reproduce codecept run unit with the reported versions and verify the documentation covers the Yii2 error and output path; done means the setup steps are accurate and the command behavior is explained.

Written by the indexing model from the issue text.

Description

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

Dominant language
JavaScript
Stars
42
Forks
160
Avg merge
3h 9m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from craftcms/docs

All issues in craftcms/docs

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.