craftcms / craftcms/docs

Improve “Setting Up Tests”

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

Nobody has claimed this yet.

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

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

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.

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.