Problem
The Api/EditEntityTest class fails if run in a test suite with Api/SetClaimValueTest before it. 87 tests fail with the message:
Undefined index: %Q42%
Steps to reproduce
In a Mediawiki checkout with the Wikibase extension installed.
- Copy phpunit.dist.xml to phpunit.xml
- Add a test suite with the following three tests:
<testsuite name="failing_group"> <file>./extensions/Wikibase/repo/tests/phpunit/includes/Api/SetClaimValueTest.php</file> <file>./extensions/Wikibase/repo/tests/phpunit/includes/Api/EditEntityTest.php</file> </testsuite>
- Run the named test suite:
mw docker mediawiki exec -- composer run phpunit:entrypoint -- --testsuite failing_group
Observed behaviour
The test run fails:
$ mw docker mediawiki exec -- composer run phpunit:entrypoint -- --testsuite failing_group > phpunit '--testsuite' 'failing_group' Running with MediaWiki settings because there might be integration tests PHPUnit 9.6.16 by Sebastian Bergmann and contributors. .........EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 65 / 96 ( 67%) EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 96 / 96 (100%) Time: 00:01.157, Memory: 99.00 MB There were 87 errors: ...
Expected Behaviour
The tests should pass.