wiki.techinc.nl/tests/phpunit/integration/includes/diff/DifferenceEngineSlotDiffRendererIntegrationTest.php
Derick Alangi f88eab53a6 tests: Use overrideConfig(Value|Values) where needed
This continues the work in the child patch to replace callers
of setMwGlobals() with the appropriate method. Directory this
patch covers is `tests/phpunit/integration/`.

Change-Id: I0a9abf0d2a43587f2ffa029b68024a1ba5165fc7
2022-07-12 14:40:46 +01:00

24 lines
684 B
PHP

<?php
use MediaWiki\MainConfigNames;
/**
* @group small
*/
class DifferenceEngineSlotDiffRendererIntegrationTest extends \MediaWikiIntegrationTestCase {
/**
* @covers DifferenceEngineSlotDiffRenderer::getExtraCacheKeys
*/
public function testGetExtraCacheKeys_noExternalDiffEngineConfigured() {
$this->overrideConfigValues( [
MainConfigNames::DiffEngine => null,
MainConfigNames::ExternalDiffEngine => null,
] );
$differenceEngine = new CustomDifferenceEngine();
$slotDiffRenderer = new DifferenceEngineSlotDiffRenderer( $differenceEngine );
$extraCacheKeys = $slotDiffRenderer->getExtraCacheKeys();
$this->assertSame( [ 'foo' ], $extraCacheKeys );
}
}