From e77af93e836e99886d59ddf89c28a73cf818e0c9 Mon Sep 17 00:00:00 2001 From: "Amir E. Aharoni" Date: Thu, 1 Oct 2015 23:13:34 +0300 Subject: [PATCH] Add @codingStandardsIgnoreStart to 5 files under tests/phpunit/includes To pass phpcs. Bug: T102614 Change-Id: I4c7d60d26112c7ba67b66f1923ce945e96175d15 --- tests/phpunit/includes/OutputPageTest.php | 2 ++ tests/phpunit/includes/content/CssContentTest.php | 2 ++ .../includes/content/JavaScriptContentHandlerTest.php | 2 ++ tests/phpunit/includes/content/JavaScriptContentTest.php | 8 ++++++-- tests/phpunit/includes/utils/MWCryptHashTest.php | 4 ++++ 5 files changed, 16 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/includes/OutputPageTest.php b/tests/phpunit/includes/OutputPageTest.php index fbb398277b..51a19c6a81 100644 --- a/tests/phpunit/includes/OutputPageTest.php +++ b/tests/phpunit/includes/OutputPageTest.php @@ -137,6 +137,7 @@ class OutputPageTest extends MediaWikiTestCase { } public static function provideMakeResourceLoaderLink() { + // @codingStandardsIgnoreStart Generic.Files.LineLength return array( // Load module script only array( @@ -193,6 +194,7 @@ class OutputPageTest extends MediaWikiTestCase { . "\n} );" ), ); + // @codingStandardsIgnoreEnd } /** diff --git a/tests/phpunit/includes/content/CssContentTest.php b/tests/phpunit/includes/content/CssContentTest.php index 59bfb03cc3..24b0c68227 100644 --- a/tests/phpunit/includes/content/CssContentTest.php +++ b/tests/phpunit/includes/content/CssContentTest.php @@ -100,6 +100,7 @@ class CssContentTest extends JavaScriptContentTest { * Keep this in sync with CssContentHandlerTest::provideMakeRedirectContent() */ public static function provideGetRedirectTarget() { + // @codingStandardsIgnoreStart Generic.Files.LineLength return array( array( 'MediaWiki:MonoBook.css', "/* #REDIRECT */@import url(//example.org/w/index.php?title=MediaWiki:MonoBook.css&action=raw&ctype=text/css);" ), array( 'User:FooBar/common.css', "/* #REDIRECT */@import url(//example.org/w/index.php?title=User:FooBar/common.css&action=raw&ctype=text/css);" ), @@ -109,6 +110,7 @@ class CssContentTest extends JavaScriptContentTest { # Wrong domain array( null, "/* #REDIRECT */@import url(//example.com/w/index.php?title=Gadget:FooBaz.css&action=raw&ctype=text/css);" ), ); + // @codingStandardsIgnoreEnd } public static function dataEquals() { diff --git a/tests/phpunit/includes/content/JavaScriptContentHandlerTest.php b/tests/phpunit/includes/content/JavaScriptContentHandlerTest.php index 0f41020f25..69fc9afcec 100644 --- a/tests/phpunit/includes/content/JavaScriptContentHandlerTest.php +++ b/tests/phpunit/includes/content/JavaScriptContentHandlerTest.php @@ -21,10 +21,12 @@ class JavaScriptContentHandlerTest extends MediaWikiTestCase { * Keep this in sync with JavaScriptContentTest::provideGetRedirectTarget() */ public static function provideMakeRedirectContent() { + // @codingStandardsIgnoreStart Generic.Files.LineLength return array( array( 'MediaWiki:MonoBook.js', '/* #REDIRECT */mw.loader.load("//example.org/w/index.php?title=MediaWiki:MonoBook.js\u0026action=raw\u0026ctype=text/javascript");' ), array( 'User:FooBar/common.js', '/* #REDIRECT */mw.loader.load("//example.org/w/index.php?title=User:FooBar/common.js\u0026action=raw\u0026ctype=text/javascript");' ), array( 'Gadget:FooBaz.js', '/* #REDIRECT */mw.loader.load("//example.org/w/index.php?title=Gadget:FooBaz.js\u0026action=raw\u0026ctype=text/javascript");' ), ); + // @codingStandardsIgnoreEnd } } diff --git a/tests/phpunit/includes/content/JavaScriptContentTest.php b/tests/phpunit/includes/content/JavaScriptContentTest.php index fec1c73adb..b97842c43c 100644 --- a/tests/phpunit/includes/content/JavaScriptContentTest.php +++ b/tests/phpunit/includes/content/JavaScriptContentTest.php @@ -116,10 +116,12 @@ class JavaScriptContentTest extends TextContentTest { public static function dataPreloadTransform() { return array( - array( 'hello this is ~~~', + array( + 'hello this is ~~~', 'hello this is ~~~', ), - array( 'hello \'\'this\'\' is foobar', + array( + 'hello \'\'this\'\' is foobar', 'hello \'\'this\'\' is foobar', ), ); @@ -326,6 +328,7 @@ class JavaScriptContentTest extends TextContentTest { * Keep this in sync with JavaScriptContentHandlerTest::provideMakeRedirectContent() */ public static function provideGetRedirectTarget() { + // @codingStandardsIgnoreStart Generic.Files.LineLength return array( array( 'MediaWiki:MonoBook.js', '/* #REDIRECT */mw.loader.load("//example.org/w/index.php?title=MediaWiki:MonoBook.js\u0026action=raw\u0026ctype=text/javascript");' ), array( 'User:FooBar/common.js', '/* #REDIRECT */mw.loader.load("//example.org/w/index.php?title=User:FooBar/common.js\u0026action=raw\u0026ctype=text/javascript");' ), @@ -335,5 +338,6 @@ class JavaScriptContentTest extends TextContentTest { // Different domain array( null, '/* #REDIRECT */mw.loader.load("//example.com/w/index.php?title=MediaWiki:OtherWiki.js\u0026action=raw\u0026ctype=text/javascript");' ), ); + // @codingStandardsIgnoreEnd } } diff --git a/tests/phpunit/includes/utils/MWCryptHashTest.php b/tests/phpunit/includes/utils/MWCryptHashTest.php index 406f42142c..ad54e2f39e 100644 --- a/tests/phpunit/includes/utils/MWCryptHashTest.php +++ b/tests/phpunit/includes/utils/MWCryptHashTest.php @@ -21,7 +21,9 @@ class MWCryptHashTest extends MediaWikiTestCase { } $data = 'foobar'; + // @codingStandardsIgnoreStart Generic.Files.LineLength $hash = '9923afaec3a86f865bb231a588f453f84e8151a2deb4109aebc6de4284be5bebcff4fab82a7e51d920237340a043736e9d13bab196006dcca0fe65314d68eab9'; + // @codingStandardsIgnoreEnd $this->assertEquals( pack( 'H*', $hash ), @@ -42,7 +44,9 @@ class MWCryptHashTest extends MediaWikiTestCase { $data = 'foobar'; $key = 'secret'; + // @codingStandardsIgnoreStart Generic.Files.LineLength $hash = 'ddc94177b2020e55ce2049199fd9cc6327f416ff6dc621cc34cb43d9bec61d73372b4790c0e24957f565ecaf2d42821e6303619093e99cbe14a3b9250bda5f81'; + // @codingStandardsIgnoreEnd $this->assertEquals( pack( 'H*', $hash ), -- 2.20.1