Skip to content

Commit

Permalink
Remove 4th parameter on new LinkedDataSchemaGenerator
Browse files Browse the repository at this point in the history
The constructor of LinkedDataSchemaGenerator has only three parameters.

Change-Id: I519f7d3168b1d422139f83f3affb4c422d110c2c
  • Loading branch information
Fomafix committed Jan 13, 2025
1 parent 24ec8a1 commit 3bf0bfd
Showing 1 changed file with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

use File;
use MediaWiki\Language\Language;
use MediaWiki\Revision\RevisionLookup;
use MediaWiki\Revision\RevisionRecord;
use MediaWiki\Title\Title;
use Wikibase\Client\Hooks\LinkedDataSchemaGenerator;
use Wikibase\Client\RepoLinker;
Expand Down Expand Up @@ -38,8 +36,7 @@ public function testCreateSchema( $revisionTimestamp, callable $imageFactory, $d
$generator = new LinkedDataSchemaGenerator(
$this->createMock( Language::class ),
$repoLinker,
WikibaseClient::getTermLookup(),
$this->createMockRevisionLookup( '1022523983' )
WikibaseClient::getTermLookup()
);

$title = $this->mockTitle( 'https://de.wikipedia.org/wiki', 'Douglas Adams' );
Expand Down Expand Up @@ -140,18 +137,4 @@ private function mockTitle( $baseURL, $titleText ) {
return $mock;
}

/**
* @param string|null $timestamp
* @return RevisionLookup
*/
private function createMockRevisionLookup( $timestamp ) {
$revisionRecord = $this->createMock( RevisionRecord::class );
$revisionRecord->method( 'getTimestamp' )
->willReturn( $timestamp );
$mockRevLookup = $this->createMock( RevisionLookup::class );
$mockRevLookup->method( 'getFirstRevision' )
->willReturn( $revisionRecord );
return $mockRevLookup;
}

}

0 comments on commit 3bf0bfd

Please sign in to comment.