jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/391344 )
Change subject: Type annotations for some tests
......................................................................
Type annotations for some tests
Also fix one function's case.
Change-Id: Ibe1750e6cfed593304e027d4eda7609a73980e62
---
M tests/phpunit/TemplateStylesHooksTest.php
1 file changed, 4 insertions(+), 3 deletions(-)
Approvals:
jenkins-bot: Verified
Anomie: Looks good to me, approved
diff --git a/tests/phpunit/TemplateStylesHooksTest.php
b/tests/phpunit/TemplateStylesHooksTest.php
index 61aff7e..c094b40 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 = 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: merged
Gerrit-Change-Id: Ibe1750e6cfed593304e027d4eda7609a73980e62
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/TemplateStyles
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits