MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/391344 )
Change subject: Type annotations for some tests ...................................................................... Type annotations for some tests Change-Id: Ibe1750e6cfed593304e027d4eda7609a73980e62 --- M tests/phpunit/TemplateStylesHooksTest.php 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateStyles refs/changes/44/391344/1 diff --git a/tests/phpunit/TemplateStylesHooksTest.php b/tests/phpunit/TemplateStylesHooksTest.php index 61aff7e..641a182 100644 --- a/tests/phpunit/TemplateStylesHooksTest.php +++ b/tests/phpunit/TemplateStylesHooksTest.php @@ -134,7 +134,7 @@ * tag's output depends on the revision IDs of the input pages. * @dataProvider provideTag */ - public function testTag( $popt, $wikitext, $expect ) { + public function testTag( ParserOptions $popt, $wikitext, $expect ) { global $wgParserConf; $this->setMwGlobals( [ @@ -144,14 +144,14 @@ ] ); $oldCurrentRevisionCallback = $popt->setCurrentRevisionCallback( - function ( $title, $parser = false ) use ( &$oldCurrentRevisionCallback ) { + function ( Title $title, Parser $parser = false ) use ( &$oldCurrentRevisionCallback ) { if ( $title->getPrefixedText() === 'Template:Test replacement' ) { $user = RequestContext::getMain()->getUser(); return new Revision( [ 'page' => $title->getArticleID(), 'user_text' => $user->getName(), 'user' => $user->getId(), - 'parent_id' => $title->getLatestRevId(), + 'parent_id' => $title->getLatestRevID(), 'title' => $title, 'content' => new TemplateStylesContent( '.baz { color:orange; bogus:bogus; }' ) ] ); @@ -162,6 +162,7 @@ $class = $wgParserConf['class']; $parser = new $class( $wgParserConf ); + /** @var Parser $parser */ $parser->firstCallInit(); if ( !isset( $parser->mTagHooks['templatestyles'] ) ) { $this->markTestSkipped( 'templatestyles tag hook is not in the parser' ); -- To view, visit https://gerrit.wikimedia.org/r/391344 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe1750e6cfed593304e027d4eda7609a73980e62 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TemplateStyles Gerrit-Branch: master Gerrit-Owner: MaxSem <maxsem.w...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits