class autoloading from the Traits subnamespace is not working in Recipe tests

Created on 5 August 2025, 14 days ago

Problem/Motivation

We are covering are recipes with different tests. For that we needed to have a re-usable content creation trait. But the problem is that the trait in the Traits namespace is not loaded and the tests break. This particularly happens for recipes, as modules work fine in that sense.

For now, we have to use require_once in our code to include the trait.

Steps to reproduce

Create a recipe.
Create a tests dir inside it.
Add normal tests.
Create a Traits dir.
Add a testing trait.
Try loading the trait in your test.

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

phpunit

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024