Problem
Wikibase/repo/tests/phpunit/includes/SummaryFormatterTest.php has PHPUnit test failures when run in a suite with DiscussionTools/tests/phpunit/integration/ApiParseDiscussionToolsTest.php. 6 tests fail:
1) Wikibase\Repo\Tests\SummaryFormatterTest::testOnFormat with data set #4 ('item', 'wikibase-item', false, 'wbsetlabel-set:1|<>', false, 'Title', false, '!<span dir="auto"><span class...span>!') Didn't find the expected final comment Failed asserting that '<span dir="auto"><span class="autocomment">Changed [<>] label</span></span>' matches PCRE pattern "!<span dir="auto"><span class="autocomment">.*?\[<>\].*?</span></span>!". 2) Wikibase\Repo\Tests\SummaryFormatterTest::testOnFormat with data set #5 ('item', 'wikibase-item', false, 'wbsetlabel-set:1|<>', false, 'Title', false, '!<span dir="auto"><span class...span>!') Didn't find the expected final comment Failed asserting that '<span dir="auto"><span class="autocomment">Changed [<>] label</span></span>' matches PCRE pattern "!<span dir="auto"><span class="autocomment">.*?\[<>\].*?</span></span>!". 3) Wikibase\Repo\Tests\SummaryFormatterTest::testOnFormat with data set #6 ... 4) Wikibase\Repo\Tests\SummaryFormatterTest::testOnFormat with data set #7 ... 5) Wikibase\Repo\Tests\SummaryFormatterTest::testOnFormat with data set #9 ... 6) Wikibase\Repo\Tests\SummaryFormatterTest::testOnFormat with data set #10 ...
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 two tests:
<testsuite name="failing_group"> <file>extensions/DiscussionTools/tests/phpunit/integration/ApiParseDiscussionToolsTest.php</file> <file>extensions/Wikibase/repo/tests/phpunit/includes/SummaryFormatterTest.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
Expected behaviour
The tests pass