From 3bf0bfdbedcf0b0a0a197a73263ef005bb4f883c Mon Sep 17 00:00:00 2001 From: Fomafix Date: Mon, 13 Jan 2025 21:35:52 +0000 Subject: [PATCH] Remove 4th parameter on new LinkedDataSchemaGenerator The constructor of LinkedDataSchemaGenerator has only three parameters. Change-Id: I519f7d3168b1d422139f83f3affb4c422d110c2c --- .../SkinAfterBottomScriptsHandlerTest.php | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/client/tests/phpunit/integration/includes/Hooks/SkinAfterBottomScriptsHandlerTest.php b/client/tests/phpunit/integration/includes/Hooks/SkinAfterBottomScriptsHandlerTest.php index 31e3e12d5f..b08e08de7e 100644 --- a/client/tests/phpunit/integration/includes/Hooks/SkinAfterBottomScriptsHandlerTest.php +++ b/client/tests/phpunit/integration/includes/Hooks/SkinAfterBottomScriptsHandlerTest.php @@ -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; @@ -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' ); @@ -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; - } - }