Skip to content

Conversation

@donquixote
Copy link

For newer versions of phpunit, data provider methods should be public.

Also, the value keys in data provider records should match parameter names, OR they should simply be parameter lists instead of associative arrays.

Steps to reproduce:

./vendor/bin/phpunit tests/Util/FixturesTest.php --display-all-issues --stop-on-deprecation

We get

1) BigBlueButton\Util\FixturesTest::testStructureOfFixturesIsStillUpToDate
* Data Provider method BigBlueButton\Util\FixturesTest::xmlFileToFunctionMapping() is not public

* Data Provider method BigBlueButton\Util\FixturesTest::xmlFileToFunctionMapping() is not static

/****/tests/Util/FixturesTest.php:114

and multiple of these:

2) BigBlueButton\Util\FixturesTest::testStructureOfFixturesIsStillUpToDate with data set "case01_api_version" ('getApiVersion', 'api_version.xml', true, '', null)
Providing invalid named argument $function for method BigBlueButton\Util\FixturesTest::testStructureOfFixturesIsStillUpToDate() is deprecated and will not be supported in PHPUnit 11.0..

/****/tests/Util/FixturesTest.php:114

* @dataProvider xmlFileToFunctionMapping
*/
public function testStructureOfFixturesIsStillUpToDate(string $requestFunction, string $filename, bool $success, string $messageKey, ?\Closure $parameters): void
public function testStructureOfFixturesIsStillUpToDate(string $method, string $filename, bool $success, string $messageKey, ?\Closure $parameters): void
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think $method is more suitable than $function or $requestFunction, because it is, in fact, a method and not a function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant