Problem
The RevisionFormatterTest class fails if run in a test suite with PermissionsTest before it. 2 tests fail with errors. Running the classes individually causes no problems.
Steps to reproduce
In a Mediawiki checkout with the Flow extension installed.
- Copy phpunit.dist.xml to phpunit.xml
- Add a test suite with the following two tests:
<testsuite name="failing_group"> <file>extensions/Flow/tests/phpunit/PermissionsTest.php</file> <file>extensions/Flow/tests/phpunit/Formatter/RevisionFormatterTest.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.19 by Sebastian Bergmann and contributors. ............................................................... 63 / 131 ( 48%) ............................................................... 126 / 131 ( 96%) .EE.. 131 / 131 (100%) Time: 00:01.382, Memory: 129.00 MB There were 2 errors: 1) Flow\Tests\Formatter\RevisionFormatterTest::testMockFormatterBasicallyWorks Wikimedia\Services\ContainerDisabledException: Container disabled! /src/vendor/wikimedia/services/src/ServiceContainer.php:403 === 2) Flow\Tests\Formatter\RevisionFormatterTest::testFormattingEditedTitle Wikimedia\Services\ContainerDisabledException: Container disabled! /src/vendor/wikimedia/services/src/ServiceContainer.php:403 === ERRORS! Tests: 131, Assertions: 132, Errors: 2.
Expected Behaviour
The tests should pass.