Skip to content
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

Make PHPUnit 10.1 XML coverage report and test cases names with provider compatible with Infection and old format #1854

Merged
merged 1 commit into from May 13, 2023

Conversation

maks-rafalko
Copy link
Member

In PHPUnit >=10 data providers with keys are stored as Class\\test_method#some key

In PHPUnit <10 data providers with keys are stored as Class\\test_method with data set "some key".

We need to translate to the old format because this is what PHPUnit <10 and >=10 understand from CLI --filter option.

In other words, PHPUnit 10 has a BC break in XML coverage reports that this PR workarounds.

Fixes #1825

…der compatible with Infection and old format

In PHPUnit >=10 data providers with keys are stored as `Class\\test_method#some key`

In PHPUnit <10 data providers with keys are stored as `Class\\test_method with data set "some key"`.

We need to translate to the old format because this is what PHPUnit <10 and >=10 understand from CLI `--filter` option.

In other words, PHPUnit 10 has a BC break in XML coverage reports that this PR workarounds.
@maks-rafalko maks-rafalko merged commit ebbe59e into master May 13, 2023
41 checks passed
@maks-rafalko maks-rafalko deleted the bugfix/1825-covering-test-cases-phpunit-10 branch May 13, 2023 19:24
@maks-rafalko
Copy link
Member Author

thank you, @sidz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infection's --only-covering-test-cases flag does not work correctly on PHPUnit 10
2 participants