Page MenuHomePhabricator

Use of HTMLFormFieldTestCase causes "Empty data set provided by data provider" failures under PHPUnit 10
Open, Needs TriagePublic

Description

PHPUnit 10 marks empty data provider as invalid with the text "Empty data set provided by data provider" and count this as errors.

Some of the provider of the abstract HTMLFormFieldTestCase are designed to return empty array in case there is nothing to test.
But that does not work under PHPUnit 10.

Example from WikimediaEvents

1) WikimediaEvents\Tests\Integration\CreateAccount\HTMLNoScriptHiddenFieldTest::testGetCodex
The data provider specified for WikimediaEvents\Tests\Integration\CreateAccount\HTMLNoScriptHiddenFieldTest::testGetCodex is invalid
Empty data set provided by data provider

WikimediaEvents\tests\phpunit\integration\CreateAccount\HTMLNoScriptHiddenFieldTest.php:97