Problem
The DifferenceEngineTest::testMapDiffPrevNext test fails if the DifferenceEngineTest class is run standalone in a Quibble / CI test context. The test fails with the message:
1) DifferenceEngineTest::testShowDiffPage with data set "missing prev" (array('rev[0]', 'prev'), array('read'), array('\(diff-empty\).*<div class="m...ittens')) OOUI\Exception: OOUI\Theme::singleton was called with no singleton theme set. in /workspace/src/vendor/oojs/oojs-ui/php/Theme.php:31
Steps to reproduce
- Open the Quibble shell by launching quibble and passing -c bash as the test command (see docs)
- Run the DifferenceEngineTest class on its own
Observed behaviour
The test run fails:
$ composer run --timeout=0 phpunit:entrypoint -- ./tests/phpunit/includes/diff/DifferenceEngineTest.php > phpunit './tests/phpunit/includes/diff/DifferenceEngineTest.php' Using PHP 7.4.33 Running with MediaWiki settings because there might be integration tests PHPUnit 9.6.16 by Sebastian Bergmann and contributors. ......................................E.......... 49 / 49 (100%) Time: 00:01.073, Memory: 111.00 MB There was 1 error: 1) DifferenceEngineTest::testShowDiffPage with data set "missing prev" (array('rev[0]', 'prev'), array('read'), array('\(diff-empty\).*<div class="m...ittens')) OOUI\Exception: OOUI\Theme::singleton was called with no singleton theme set. in /workspace/src/vendor/oojs/oojs-ui/php/Theme.php:31 Stack trace: #0 /workspace/src/vendor/oojs/oojs-ui/php/Element.php(259): OOUI\Theme::singleton() ...
Expected Behaviour
The tests should pass.