Skip to content

Commit

Permalink
Merge "Remove 4th parameter on new LinkedDataSchemaGenerator"
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Jan 14, 2025
2 parents 851f012 + 3bf0bfd commit 4973524
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 4973524

Please sign in to comment.