getType() && $param->getType()->getName() === ILBFactory::class ) { $mock = $this->createNoOpMock( ILBFactory::class, [ 'getMainLB', 'getLocalDomainID' ] ); $mock->method( 'getMainLB' ) ->willReturn( $this->createNoOpMock( ILoadBalancer::class ) ); $mock->method( 'getLocalDomainID' ) ->willReturn( WikiMap::getCurrentWikiId() ); return [ $mock ]; } if ( $param->getType() && $param->getType()->getName() === JobQueueGroupFactory::class ) { $mock = $this->createNoOpMock( JobQueueGroupFactory::class, [ 'makeJobQueueGroup' ] ); $mock->method( 'makeJobQueueGroup' ) ->willReturn( $this->createNoOpMock( JobQueueGroup::class ) ); return [ $mock ]; } return []; } }