Skip to content

Make invocation of test method customizable #6450

@binaryfire

Description

@binaryfire

Hi Sebastian

Swoole-based framworks use coroutines, which require special handling when running tests. In Hyperf, this is how it's handled: https://github.com/hyperf/hyperf/blob/e901f78e453fb9c1af70bac534087f7a07202cfe/src/testing/src/Concerns/RunTestsInCoroutine.php#L24

Unfortunately changing runTest from protected to private in this PR means this is no longer possible with PHPUnit versions after 10.5.45.

Would you please consider making runTest protected and an officially supported extension point? Or if not, is there another way to achieve what we're doing in the linked trait?

I know you mentioned in #6172 that this is beyond the scope of the project, however that means there will be entire PHP frameworks and communities who will no longer be able to use PHPUnit. There are already discussions about exploring workarounds using the unfinalize package. It'd be a shame if that kind of thing was necessary to get it working.

Metadata

Metadata

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions