Skip to content

New attribute TestWithArray #6242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sartor
Copy link

@sartor sartor commented Jun 18, 2025

New attribute TestWithArray introduced.
More compact version of existing TestWith for many cases.

Example:

    #[TestWithArray([
        'odd' => [1, true],
        'even' => [2, false],
    ])]
    public function testNumbers($number, $isOdd): void
    {
        $this->assertSame($isOdd, $number % 2 === 1);
    }

@sebastianbergmann sebastianbergmann added type/enhancement A new idea that should be implemented feature/data-provider Data Providers feature/metadata/attributes labels Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/data-provider Data Providers feature/metadata/attributes type/enhancement A new idea that should be implemented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants