The db/ directory does not have an owner and it's a mess in general. These classes don't depend on anything in core except the rdbms library. Let's simply move it there. In other words, Krinkle made me do it. Since the class was moved in I6202e52ba73 merged less than a week ago, no need to alias anything. Bug: T321882 Change-Id: I24ceeb8bf765a50f441270136acd612359d50aa2
34 lines
1 KiB
PHP
34 lines
1 KiB
PHP
<?php
|
|
|
|
use MediaWiki\Config\ServiceOptions;
|
|
use MediaWiki\JobQueue\JobQueueGroupFactory;
|
|
use MediaWiki\MainConfigNames;
|
|
use Wikimedia\Rdbms\ConfiguredReadOnlyMode;
|
|
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( [
|
|
MainConfigNames::LocalDatabases => [],
|
|
MainConfigNames::JobClasses => [],
|
|
MainConfigNames::JobTypeConf => [],
|
|
MainConfigNames::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() );
|
|
}
|
|
}
|