Tests: fix PHPUnit deprecation notices #871
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Type
This is a:
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.".