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

Tests: fix PHPUnit deprecation notices #871

Merged
merged 3 commits into from
Jun 3, 2024

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Jun 3, 2024

Pull Request Type

  • I have checked there is no other PR open for the same change.

This is a:

  • Code quality improvement

Context

Tests: fix PHPUnit deprecation notices [1]

Removes the key from the entries returned by the TypeProviderHelper methods.

This puts the responsibility for having names for the individual entries in each dataset on the data provider methods in the tests (if so desired).
This prevents the TypeProviderHelper class having influence on what the parameter names for test methods should be.

This fixes a number of PHPUnit (10.5+) deprecation notices along the lines of "Providing invalid named argument $input for method WpOrg\Requests\Tests**Test::test*() is deprecated and will not be supported in PHPUnit 11.0.".

Includes minor documentation fix for the affected methods in the TypeProviderHelper class.

Tests: fix PHPUnit deprecation notices [2]

Ensure the keys in datasets match the parameter names of the test methods to which the datasets are being passed.

This fixes a number of PHPUnit (10.5+) deprecation notices along the lines of "Providing invalid named argument $input for method WpOrg\Requests\Tests**Test::test*() is deprecated and will not be supported in PHPUnit 11.0.".

Tests: fix PHPUnit deprecation notices [3]

Make sure data providers only pass the arguments supported by the test.

This fixes a number of PHPUnit (10.5+) deprecation notices along the lines of "Providing invalid named argument $* for method WpOrg\Requests\Tests**Test::test*() is deprecated and will not be supported in PHPUnit 11.0.".

jrfnl added 2 commits June 3, 2024 11:57
Removes the key from the entries returned by the `TypeProviderHelper` methods.

This puts the responsibility for having names for the individual entries in each dataset on the data provider methods in the tests (if so desired).
This prevents the `TypeProviderHelper` class having influence on what the parameter names for test methods should be.

This fixes a number of PHPUnit (10.5+) deprecation notices along the lines of "Providing invalid named argument $input for method WpOrg\Requests\Tests\*\*Test::test*() is deprecated and will not be supported in PHPUnit 11.0.".

Includes minor documentation fix for the affected methods in the `TypeProviderHelper` class.
Ensure the keys in datasets match the parameter names of the test methods to which the datasets are being passed.

This fixes a number of PHPUnit (10.5+) deprecation notices along the lines of "Providing invalid named argument $input for method WpOrg\Requests\Tests\*\*Test::test*() is deprecated and will not be supported in PHPUnit 11.0.".
@jrfnl jrfnl added this to the 2.1.0 milestone Jun 3, 2024
@jrfnl jrfnl requested a review from schlessera June 3, 2024 09:57
@jrfnl jrfnl mentioned this pull request Jun 3, 2024
5 tasks
Make sure data providers only pass the arguments supported by the test.

This fixes a number of PHPUnit (10.5+) deprecation notices along the lines of "Providing invalid named argument $* for method WpOrg\Requests\Tests\*\*Test::test*() is deprecated and will not be supported in PHPUnit 11.0.".
@jrfnl jrfnl force-pushed the feature/tests-fix-phpunit-deprecation-notice branch from eb2a058 to 1f45ea4 Compare June 3, 2024 10:01
@schlessera schlessera merged commit de90c8e into develop Jun 3, 2024
27 of 28 checks passed
@schlessera schlessera deleted the feature/tests-fix-phpunit-deprecation-notice branch June 3, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants