Problem
The SkinMinervaTest class fails if run in a test suite with SpecialAvailableBadgesTest before it. 1 test errors and 3 tests fail. Running the classes individually causes no problems.
Steps to reproduce
In a Mediawiki checkout with the Wikibase extension and Minerva skin installed.
- Copy phpunit.dist.xml to phpunit.xml
- Add a test suite with the following two tests:
<testsuite name="failing_group"> <file>extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialAvailableBadgesTest.php</file> <file>skins/MinervaNeue/tests/phpunit/skins/SkinMinervaTest.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. ....F..FF....E.................. 32 / 32 (100%) Time: 00:01.601, Memory: 62.50 MB There was 1 error: 1) MediaWiki\Minerva\SkinMinervaTest::testGetTabsDataNoPageTabs RuntimeException: Database backend disabled /var/www/html/w/includes/libs/rdbms/loadbalancer/LoadBalancerDisabled.php:72 ... -- There were 3 failures: 1) MediaWiki\Minerva\SkinMinervaTest::testHasPageActions with data set #2 (0, 'Main Page', 'view', false) Failed asserting that true matches expected false. /var/www/html/w/skins/MinervaNeue/tests/phpunit/skins/SkinMinervaTest.php:90 2) MediaWiki\Minerva\SkinMinervaTest::testHasPageTabs with data set #1 (array(false), 0, 'Main Page', 'view', false) Failed asserting that true matches expected false. /var/www/html/w/skins/MinervaNeue/tests/phpunit/skins/SkinMinervaTest.php:122 3) MediaWiki\Minerva\SkinMinervaTest::testHasPageTabs with data set #2 (array(false), 1, 'Main Page', 'view', false) Failed asserting that true matches expected false. /var/www/html/w/skins/MinervaNeue/tests/phpunit/skins/SkinMinervaTest.php:122 === ERRORS! Tests: 32, Assertions: 51, Errors: 1, Failures: 3.
Expected Behaviour
The tests should pass.