composer: * mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0 The following sniffs now pass and were enabled: * Generic.ControlStructures.InlineControlStructure * MediaWiki.PHPUnit.AssertCount.NotUsed npm: * svgo: 2.3.0 → 2.3.1 * https://npmjs.com/advisories/1754 (CVE-2021-33587) Change-Id: I2a9bbee2fecbf7259876d335f565ece4b3622426
32 lines
917 B
PHP
32 lines
917 B
PHP
<?php
|
|
|
|
use MediaWiki\Config\ServiceOptions;
|
|
use MediaWiki\JobQueue\JobQueueGroupFactory;
|
|
use Wikimedia\UUID\GlobalIdGenerator;
|
|
|
|
/**
|
|
* @covers \MediaWiki\JobQueue\JobQueueGroupFactory
|
|
*/
|
|
class JobQueueGroupFactoryTest extends MediaWikiUnitTestCase {
|
|
public function testMakeJobQueueGroupReturnsSameInstance(): void {
|
|
$factory = new JobQueueGroupFactory(
|
|
new ServiceOptions(
|
|
JobQueueGroupFactory::CONSTRUCTOR_OPTIONS,
|
|
new HashConfig( [
|
|
'LocalDatabases' => [],
|
|
'JobClasses' => [],
|
|
'JobTypeConf' => [],
|
|
'JobTypesExcludedFromDefaultQueue' => []
|
|
] )
|
|
),
|
|
$this->createMock( ConfiguredReadOnlyMode::class ),
|
|
$this->createMock( IBufferingStatsdDataFactory::class ),
|
|
$this->createMock( WANObjectCache::class ),
|
|
$this->createMock( GlobalIdGenerator::class )
|
|
);
|
|
|
|
$group = $factory->makeJobQueueGroup();
|
|
|
|
$this->assertSame( $group, $factory->makeJobQueueGroup() );
|
|
}
|
|
}
|