getName() === 'initialItems' ) { return [ [] ]; } return []; } public function testNewLinkBatch() { $factory = new LinkBatchFactory( $this->createMock( LinkCache::class ), $this->createMock( TitleFormatter::class ), $this->createMock( Language::class ), $this->createMock( GenderCache::class ), $this->createMock( IConnectionProvider::class ), $this->createMock( LinksMigration::class ), LoggerFactory::getInstance( 'LinkBatch' ) ); $linkBatch = $factory->newLinkBatch( [ new TitleValue( NS_MAIN, 'Foo' ), new PageReferenceValue( NS_TALK, 'Bar', PageReference::LOCAL ), ] ); $this->assertFalse( $linkBatch->isEmpty() ); $this->assertSame( 2, $linkBatch->getSize() ); } }