jenkins-bot has submitted this change and it was merged.
Change subject: Make lines short to pass phpcs in WikitextContentTest.php
......................................................................
Make lines short to pass phpcs in WikitextContentTest.php
Bug: T102614
Change-Id: Id5f12d4cca1d952580d2bb68fdbcb3cfb2467085
---
M tests/phpunit/includes/content/WikitextContentTest.php
1 file changed, 35 insertions(+), 10 deletions(-)
Approvals:
Bartosz Dziewoński: Looks good to me, approved
Umherirrender: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/tests/phpunit/includes/content/WikitextContentTest.php
b/tests/phpunit/includes/content/WikitextContentTest.php
index b436ebf..f0d486a 100644
--- a/tests/phpunit/includes/content/WikitextContentTest.php
+++ b/tests/phpunit/includes/content/WikitextContentTest.php
@@ -90,7 +90,11 @@
foreach ( $fieldValues as $field => $value ) {
$v = $update->$field; # if the field doesn't
exist, just crash and burn
- $this->assertEquals( $value, $v, "unexpected
value for field $field in instance of $class" );
+ $this->assertEquals(
+ $value,
+ $v,
+ "unexpected value for field $field in
instance of $class"
+ );
}
}
@@ -208,10 +212,12 @@
public static function dataPreloadTransform() {
return array(
- array( 'hello this is ~~~',
+ array(
+ 'hello this is ~~~',
"hello this is ~~~",
),
- array( 'hello \'\'this\'\' is
<noinclude>foo</noinclude><includeonly>bar</includeonly>',
+ array(
+ 'hello \'\'this\'\' is
<noinclude>foo</noinclude><includeonly>bar</includeonly>',
'hello \'\'this\'\' is bar',
),
);
@@ -318,7 +324,10 @@
$this->assertTrue( $content->matchMagicWord( $mw ), "should
have matched magic word" );
$content = $this->newContent( "#REDIRECT [[FOO]]" );
- $this->assertFalse( $content->matchMagicWord( $mw ), "should
not have matched magic word" );
+ $this->assertFalse(
+ $content->matchMagicWord( $mw ),
+ "should not have matched magic word"
+ );
}
/**
@@ -340,7 +349,10 @@
$this->assertFalse( $content->equals( $newContent ), "content
should have changed" );
$this->assertTrue( $newContent->isRedirect(), "new content
should be a redirect" );
- $this->assertEquals( $target->getFullText(),
$newContent->getRedirectTarget()->getFullText() );
+ $this->assertEquals(
+ $target->getFullText(),
+ $newContent->getRedirectTarget()->getFullText()
+ );
}
/**
@@ -394,15 +406,28 @@
// Test with a redirect page
$wikitext = false;
$redirectTarget = false;
- $content = $this->newContent( "#REDIRECT
[[TestRedirectParserOption/redir]]\nhello redirect." );
+ $content = $this->newContent(
+ "#REDIRECT [[TestRedirectParserOption/redir]]\nhello
redirect."
+ );
$options = $content->getContentHandler()->makeParserOptions(
'canonical' );
$content->getParserOutput( $title, null, $options );
- $this->assertEquals( 'hello redirect.', $wikitext, 'Wikitext
passed to hook was not as expected' );
- $this->assertNotEquals( null, $redirectTarget, 'Redirect seen
in hook was null' );
- $this->assertEquals( 'TestRedirectParserOption/redir',
$redirectTarget->getFullText(),
+ $this->assertEquals(
+ 'hello redirect.',
+ $wikitext,
+ 'Wikitext passed to hook was not as expected'
+ );
+ $this->assertNotEquals(
+ null,
+ $redirectTarget,
+ 'Redirect seen in hook was null' );
+ $this->assertEquals(
+ 'TestRedirectParserOption/redir',
+ $redirectTarget->getFullText(),
'Redirect seen in hook was not the expected title'
);
- $this->assertEquals( null, $options->getRedirectTarget(),
+ $this->assertEquals(
+ null,
+ $options->getRedirectTarget(),
'ParserOptions\' redirectTarget was changed'
);
}
--
To view, visit https://gerrit.wikimedia.org/r/243017
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id5f12d4cca1d952580d2bb68fdbcb3cfb2467085
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits