Skip to content

New attribute #[RequiresPhpUnitExtension(SomeExtension::class)] #5926

@nikophil

Description

@nikophil

When developing a library which provides a PhpUnit extension, it would be useful to be able to skip some tests which do require this extension.

WDYT of a new attribute which would skip tests if the given extension is not enabled?

Maybe it can be nice to allow this attribute to be repeatable, or to accept multiple parameters, for the rare cases where two extensions are required for the given test?

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementA new idea that should be implemented

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions