Improve “Setting Up Tests”
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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