aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.phpcs.xml1
-rw-r--r--tests/common/TestsAutoLoader.php1
-rw-r--r--tests/phpunit/includes/ContentSecurityPolicyTest.php4
-rw-r--r--tests/phpunit/includes/LinkerTest.php5
-rw-r--r--tests/phpunit/includes/OutputPageTest.php4
-rw-r--r--tests/phpunit/includes/SampleTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiComparePagesTest.php1
-rw-r--r--tests/phpunit/includes/api/ApiMainTest.php2
-rw-r--r--tests/phpunit/includes/api/Validator/SubmoduleDefTest.php2
-rw-r--r--tests/phpunit/includes/api/format/ApiFormatBaseTest.php4
-rw-r--r--tests/phpunit/includes/api/format/ApiFormatPhpTest.php1
-rw-r--r--tests/phpunit/includes/api/format/ApiFormatXmlTest.php2
-rw-r--r--tests/phpunit/includes/content/CssContentHandlerTest.php1
-rw-r--r--tests/phpunit/includes/content/CssContentTest.php1
-rw-r--r--tests/phpunit/includes/content/JavaScriptContentHandlerTest.php1
-rw-r--r--tests/phpunit/includes/content/JavaScriptContentTest.php2
-rw-r--r--tests/phpunit/includes/filerepo/file/LocalFileTest.php5
-rw-r--r--tests/phpunit/includes/import/ImportTest.php5
-rw-r--r--tests/phpunit/includes/media/ExifBitmapTest.php3
-rw-r--r--tests/phpunit/includes/media/GIFHandlerTest.php2
-rw-r--r--tests/phpunit/includes/media/PNGHandlerTest.php1
-rw-r--r--tests/phpunit/includes/media/SVGReaderTest.php1
-rw-r--r--tests/phpunit/includes/media/WebPHandlerTest.php1
-rw-r--r--tests/phpunit/includes/page/WikiPageDbTest.php2
-rw-r--r--tests/phpunit/includes/parser/ParserOutputTest.php3
-rw-r--r--tests/phpunit/includes/parser/PreprocessorTest.php3
-rw-r--r--tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php10
-rw-r--r--tests/phpunit/includes/resourceloader/ResourceLoaderSkinModuleTest.php1
-rw-r--r--tests/phpunit/includes/upload/UploadBaseTest.php1
-rw-r--r--tests/phpunit/includes/utils/MWCryptHKDFTest.php1
-rw-r--r--tests/phpunit/integration/includes/CommentFormatter/CommentParserTest.php4
-rw-r--r--tests/phpunit/languages/LanguageIntegrationTest.php1
-rw-r--r--tests/phpunit/maintenance/backupPrefetchTest.php1
-rw-r--r--tests/phpunit/unit/includes/ParamValidator/TypeDef/NamespaceDefTest.php3
-rw-r--r--tests/phpunit/unit/includes/ParamValidator/TypeDef/UserDefTest.php2
-rw-r--r--tests/phpunit/unit/includes/language/LCStoreStaticArrayTest.php1
-rw-r--r--tests/phpunit/unit/includes/libs/ParamValidator/ParamValidatorTest.php20
-rw-r--r--tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/BooleanDefTest.php2
-rw-r--r--tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/EnumDefTest.php6
-rw-r--r--tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/ExpiryDefTest.php1
-rw-r--r--tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/FloatDefTest.php3
-rw-r--r--tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/IntegerDefTest.php15
-rw-r--r--tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/LimitDefTest.php2
-rw-r--r--tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/PresenceBooleanDefTest.php1
-rw-r--r--tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/StringDefTest.php4
-rw-r--r--tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/TimestampDefTest.php2
-rw-r--r--tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/UploadDefTest.php1
-rw-r--r--tests/phpunit/unit/includes/libs/ParamValidator/TypeDefTest.php5
-rw-r--r--tests/phpunit/unit/includes/libs/XmlTypeCheckTest.php1
-rw-r--r--tests/phpunit/unit/includes/libs/http/SetCookieCompatTest.php1
-rw-r--r--tests/phpunit/unit/includes/libs/rdbms/database/DatabaseSQLTest.php13
-rw-r--r--tests/phpunit/unit/includes/libs/rdbms/querybuilder/SelectQueryBuilderTest.php2
-rw-r--r--tests/phpunit/unit/includes/password/Argon2PasswordTest.php2
-rw-r--r--tests/phpunit/unit/includes/password/BcryptPasswordTest.php1
-rw-r--r--tests/phpunit/unit/includes/password/EncryptedPasswordTest.php3
-rw-r--r--tests/phpunit/unit/includes/password/LayeredParameterizedPasswordTest.php1
-rw-r--r--tests/phpunit/unit/includes/registration/VersionCheckerTest.php3
-rw-r--r--tests/phpunit/unit/includes/resourceloader/VueComponentParserTest.php1
-rw-r--r--tests/phpunit/unit/includes/tidy/RemexDriverTest.php1
-rw-r--r--tests/phpunit/unit/includes/user/UserTimeCorrectionTest.php1
-rw-r--r--tests/phpunit/unit/includes/utils/MWCryptHashTest.php2
-rw-r--r--tests/qunit/QUnitTestResources.php2
62 files changed, 1 insertions, 180 deletions
diff --git a/.phpcs.xml b/.phpcs.xml
index 747269690165..5ccd941502d7 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -60,6 +60,7 @@
</rule>
<rule ref="Generic.Files.LineLength">
<exclude-pattern>*/languages/messages/*</exclude-pattern>
+ <exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="MediaWiki.Files.ClassMatchesFilename.NotMatch">
<!--
diff --git a/tests/common/TestsAutoLoader.php b/tests/common/TestsAutoLoader.php
index 8a2961099161..3eea57af58ea 100644
--- a/tests/common/TestsAutoLoader.php
+++ b/tests/common/TestsAutoLoader.php
@@ -24,7 +24,6 @@
global $wgAutoloadClasses;
$testDir = __DIR__ . "/..";
-// phpcs:disable Generic.Files.LineLength
$wgAutoloadClasses += [
# tests/common
diff --git a/tests/phpunit/includes/ContentSecurityPolicyTest.php b/tests/phpunit/includes/ContentSecurityPolicyTest.php
index bed243ab2969..28a1b3708128 100644
--- a/tests/phpunit/includes/ContentSecurityPolicyTest.php
+++ b/tests/phpunit/includes/ContentSecurityPolicyTest.php
@@ -161,7 +161,6 @@ class ContentSecurityPolicyTest extends MediaWikiIntegrationTestCase {
}
public function providerMakeCSPDirectives() {
- // phpcs:disable Generic.Files.LineLength
return [
[ false, '', '' ],
[
@@ -274,8 +273,6 @@ class ContentSecurityPolicyTest extends MediaWikiIntegrationTestCase {
$actual = $this->csp->makeCSPDirectives( true, ContentSecurityPolicy::FULL_MODE );
$wgAllowImageTag = $origImg;
-
- // phpcs:ignore Generic.Files.LineLength
$expected = "script-src 'unsafe-eval' blob: 'self' 'nonce-secret' 'unsafe-inline' sister-site.somewhere.com *.wikipedia.org; default-src * data: blob:; style-src * data: blob: 'unsafe-inline'; object-src 'none'; report-uri /w/api.php?action=cspreport&format=json";
$this->assertSame( $expected, $actual );
}
@@ -288,7 +285,6 @@ class ContentSecurityPolicyTest extends MediaWikiIntegrationTestCase {
true,
ContentSecurityPolicy::REPORT_ONLY_MODE
);
- // phpcs:ignore Generic.Files.LineLength
$expected = "script-src 'unsafe-eval' blob: 'self' 'nonce-secret' 'unsafe-inline' sister-site.somewhere.com *.wikipedia.org; default-src * data: blob:; style-src * data: blob: 'unsafe-inline'; object-src 'none'; report-uri /w/api.php?action=cspreport&format=json&reportonly=1";
$this->assertSame( $expected, $actual );
}
diff --git a/tests/phpunit/includes/LinkerTest.php b/tests/phpunit/includes/LinkerTest.php
index bd9d6c412eac..6f921ecbb4d3 100644
--- a/tests/phpunit/includes/LinkerTest.php
+++ b/tests/phpunit/includes/LinkerTest.php
@@ -308,8 +308,6 @@ class LinkerTest extends MediaWikiLangTestCase {
public function provideCasesForFormatComment() {
$wikiId = 'enwiki'; // $wgConf has a fake entry for this
-
- // phpcs:disable Generic.Files.LineLength
return [
// Linker::formatComment
[
@@ -585,7 +583,6 @@ class LinkerTest extends MediaWikiLangTestCase {
}
public static function provideCasesForFormatLinksInComment() {
- // phpcs:disable Generic.Files.LineLength
return [
[
'foo bar <a href="/wiki/Special:BlankPage" title="Special:BlankPage">Special:BlankPage</a>',
@@ -693,7 +690,6 @@ class LinkerTest extends MediaWikiLangTestCase {
}
public static function provideCommentBlock() {
- // phpcs:disable Generic.Files.LineLength
return [
[
' <span class="comment">(Test)</span>',
@@ -770,7 +766,6 @@ class LinkerTest extends MediaWikiLangTestCase {
}
public static function provideRevComment() {
- // phpcs:disable Generic.Files.LineLength
return [
'Should be visible' => [
' <span class="comment">(Some comment!)</span>'
diff --git a/tests/phpunit/includes/OutputPageTest.php b/tests/phpunit/includes/OutputPageTest.php
index fa2de09ed4b4..b903be907354 100644
--- a/tests/phpunit/includes/OutputPageTest.php
+++ b/tests/phpunit/includes/OutputPageTest.php
@@ -23,8 +23,6 @@ class OutputPageTest extends MediaWikiIntegrationTestCase {
private const SCREEN_MEDIA_QUERY = 'screen and (min-width: 982px)';
private const SCREEN_ONLY_MEDIA_QUERY = 'only screen and (min-width: 982px)';
-
- // phpcs:disable Generic.Files.LineLength
private const RSS_RC_LINK = '<link rel="alternate" type="application/rss+xml" title=" RSS feed" href="/w/index.php?title=Special:RecentChanges&amp;feed=rss"/>';
private const ATOM_RC_LINK = '<link rel="alternate" type="application/atom+xml" title=" Atom feed" href="/w/index.php?title=Special:RecentChanges&amp;feed=atom"/>';
@@ -2634,7 +2632,6 @@ class OutputPageTest extends MediaWikiIntegrationTestCase {
}
public static function provideMakeResourceLoaderLink() {
- // phpcs:disable Generic.Files.LineLength
return [
// Single only=scripts load
[
@@ -2734,7 +2731,6 @@ class OutputPageTest extends MediaWikiIntegrationTestCase {
}
public static function provideBuildExemptModules() {
- // phpcs:disable Generic.Files.LineLength
return [
'empty' => [
'exemptStyleModules' => [],
diff --git a/tests/phpunit/includes/SampleTest.php b/tests/phpunit/includes/SampleTest.php
index 76d6c6a2dabc..fb03dcc274bf 100644
--- a/tests/phpunit/includes/SampleTest.php
+++ b/tests/phpunit/includes/SampleTest.php
@@ -58,10 +58,8 @@ class SampleTest extends MediaWikiLangTestCase {
}
/**
- * phpcs:disable Generic.Files.LineLength
* @dataProvider provideTitles
* See https://phpunit.de/manual/6.5/en/appendixes.annotations.html#appendixes.annotations.dataProvider
- * phpcs:enable
*/
public function testCreateBasicListOfTitles( $titleName, $ns, $text ) {
$title = Title::newFromText( $titleName, $ns );
diff --git a/tests/phpunit/includes/api/ApiComparePagesTest.php b/tests/phpunit/includes/api/ApiComparePagesTest.php
index 12663bad45f8..f2db3b2f3cd8 100644
--- a/tests/phpunit/includes/api/ApiComparePagesTest.php
+++ b/tests/phpunit/includes/api/ApiComparePagesTest.php
@@ -186,7 +186,6 @@ class ApiComparePagesTest extends ApiTestCase {
}
public static function provideDiff() {
- // phpcs:disable Generic.Files.LineLength.TooLong
return [
'Basic diff, titles' => [
[
diff --git a/tests/phpunit/includes/api/ApiMainTest.php b/tests/phpunit/includes/api/ApiMainTest.php
index 0c9d09f544b2..57447abbd0f0 100644
--- a/tests/phpunit/includes/api/ApiMainTest.php
+++ b/tests/phpunit/includes/api/ApiMainTest.php
@@ -1118,7 +1118,6 @@ class ApiMainTest extends ApiTestCase {
[ 'code' => 'sv-error2', 'text' => 'Another error', 'module' => 'foo+bar' ],
],
'docref' => "See $doclink for API usage. Subscribe to the mediawiki-api-announce mailing " .
- // phpcs:ignore Generic.Files.LineLength.TooLong
"list at &lt;https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/&gt; " .
"for notice of API deprecations and breaking changes.",
'servedby' => wfHostname(),
@@ -1136,7 +1135,6 @@ class ApiMainTest extends ApiTestCase {
[ 'code' => "bad\nvalue", 'text' => 'An error' ],
],
'docref' => "See $doclink for API usage. Subscribe to the mediawiki-api-announce mailing " .
- // phpcs:ignore Generic.Files.LineLength.TooLong
"list at &lt;https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/&gt; " .
"for notice of API deprecations and breaking changes.",
'servedby' => wfHostname(),
diff --git a/tests/phpunit/includes/api/Validator/SubmoduleDefTest.php b/tests/phpunit/includes/api/Validator/SubmoduleDefTest.php
index da111529f224..6f97a93cf256 100644
--- a/tests/phpunit/includes/api/Validator/SubmoduleDefTest.php
+++ b/tests/phpunit/includes/api/Validator/SubmoduleDefTest.php
@@ -249,7 +249,6 @@ class SubmoduleDefTest extends TypeDefTestCase {
'internalvalues' => [ 'depint', 'int' ],
],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-enum"><text>1</text><list listType="comma"><text>[[Special:ApiHelp/testmod+mod1|&lt;span dir=&quot;ltr&quot; lang=&quot;en&quot;&gt;mod1&lt;/span&gt;]]</text><text>[[Special:ApiHelp/testmod+mod2|&lt;span dir=&quot;ltr&quot; lang=&quot;en&quot;&gt;mod2&lt;/span&gt;]]</text><text>[[Special:ApiHelp/testmod+recurse|&lt;span dir=&quot;ltr&quot; lang=&quot;en&quot;&gt;recurse&lt;/span&gt;]]</text><text>[[Special:ApiHelp/testmod+dep|&lt;span dir=&quot;ltr&quot; lang=&quot;en&quot; class=&quot;apihelp-deprecated-value&quot;&gt;dep&lt;/span&gt;]]</text><text>[[Special:ApiHelp/testmod+int|&lt;span dir=&quot;ltr&quot; lang=&quot;en&quot; class=&quot;apihelp-internal-value&quot;&gt;int&lt;/span&gt;]]</text><text>[[Special:ApiHelp/testmod+depint|&lt;span dir=&quot;ltr&quot; lang=&quot;en&quot; class=&quot;apihelp-deprecated-value apihelp-internal-value&quot;&gt;depint&lt;/span&gt;]]</text></list><num>6</num></message>',
ParamValidator::PARAM_ISMULTI => null,
],
@@ -277,7 +276,6 @@ class SubmoduleDefTest extends TypeDefTestCase {
'deprecatedvalues' => [ 'xyz' ],
],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-enum"><text>2</text><list listType="comma"><text>[[Special:ApiHelp/testmod+mod3|&lt;span dir=&quot;ltr&quot; lang=&quot;en&quot;&gt;mod3&lt;/span&gt;]]</text><text>[[Special:ApiHelp/testmod+mod4|&lt;span dir=&quot;ltr&quot; lang=&quot;en&quot;&gt;mod4&lt;/span&gt;]]</text><text>[[Special:ApiHelp/testmod+dep|&lt;span dir=&quot;ltr&quot; lang=&quot;en&quot; class=&quot;apihelp-deprecated-value&quot;&gt;xyz&lt;/span&gt;]]</text></list><num>3</num></message>',
ParamValidator::PARAM_ISMULTI => null,
],
diff --git a/tests/phpunit/includes/api/format/ApiFormatBaseTest.php b/tests/phpunit/includes/api/format/ApiFormatBaseTest.php
index ccfc8841526b..22c584202760 100644
--- a/tests/phpunit/includes/api/format/ApiFormatBaseTest.php
+++ b/tests/phpunit/includes/api/format/ApiFormatBaseTest.php
@@ -124,7 +124,6 @@ class ApiFormatBaseTest extends ApiFormatTestBase {
],
'wrapped HTML format' => [
[],
- // phpcs:ignore Generic.Files.LineLength.TooLong
'{"status":200,"statustext":"OK","html":"<pre class=\"api-pretty-content\">Format MOCK: &lt;b>ok&lt;/b></pre>","modules":["mediawiki.apipretty"],"continue":null,"time":1234}',
[ 'wrappedhtml' => 1 ],
[ 'name' => 'mockfm' ]
@@ -143,14 +142,12 @@ class ApiFormatBaseTest extends ApiFormatTestBase {
],
'wrapped HTML format, with set status' => [
[],
- // phpcs:ignore Generic.Files.LineLength.TooLong
'{"status":400,"statustext":"Bad Request","html":"<pre class=\"api-pretty-content\">Format MOCK: &lt;b>ok&lt;/b></pre>","modules":["mediawiki.apipretty"],"continue":null,"time":1234}',
[ 'wrappedhtml' => 1 ],
[ 'name' => 'mockfm', 'status' => 400 ]
],
'wrapped HTML format, cross-domain-policy' => [
[ 'continue' => '< CrOsS-DoMaIn-PoLiCy >' ],
- // phpcs:ignore Generic.Files.LineLength.TooLong
'{"status":200,"statustext":"OK","html":"<pre class=\"api-pretty-content\">Format MOCK: &lt;b>ok&lt;/b></pre>","modules":["mediawiki.apipretty"],"continue":"\u003C CrOsS-DoMaIn-PoLiCy \u003E","time":1234}',
[ 'wrappedhtml' => 1 ],
[ 'name' => 'mockfm' ]
@@ -399,7 +396,6 @@ class ApiFormatBaseTest extends ApiFormatTestBase {
return [
[ false, false, '(api-format-prettyprint-header-only-html: MOCK)' ],
[ true, false, '(api-format-prettyprint-header-only-html: MOCK)' ],
- // phpcs:ignore Generic.Files.LineLength.TooLong
[ false, true, '(api-format-prettyprint-header-hyperlinked: MOCK, mock, <a rel="nofollow" class="external free" href="http://example.org/wx/api.php?a=1&amp;b=2&amp;format=mock">http://example.org/wx/api.php?a=1&amp;b=2&amp;format=mock</a>)' ],
[ true, true, '(api-format-prettyprint-header: MOCK, mock)' ],
];
diff --git a/tests/phpunit/includes/api/format/ApiFormatPhpTest.php b/tests/phpunit/includes/api/format/ApiFormatPhpTest.php
index 66e620e89a6c..de3a9d4d553a 100644
--- a/tests/phpunit/includes/api/format/ApiFormatPhpTest.php
+++ b/tests/phpunit/includes/api/format/ApiFormatPhpTest.php
@@ -20,7 +20,6 @@ class ApiFormatPhpTest extends ApiFormatTestBase {
}
public static function provideGeneralEncoding() {
- // phpcs:disable Generic.Files.LineLength
return array_merge(
self::addFormatVersion( 1, [
// Basic types
diff --git a/tests/phpunit/includes/api/format/ApiFormatXmlTest.php b/tests/phpunit/includes/api/format/ApiFormatXmlTest.php
index 2f9195b17c89..02578e5cee14 100644
--- a/tests/phpunit/includes/api/format/ApiFormatXmlTest.php
+++ b/tests/phpunit/includes/api/format/ApiFormatXmlTest.php
@@ -13,7 +13,6 @@ class ApiFormatXmlTest extends ApiFormatTestBase {
parent::setUpBeforeClass();
$page = WikiPage::factory( Title::newFromText( 'MediaWiki:ApiFormatXmlTest.xsl' ) );
$user = self::getTestSysop()->getUser();
- // phpcs:disable Generic.Files.LineLength
$page->doUserEditContent( new WikitextContent(
'<?xml version="1.0"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" />'
), $user, 'Summary' );
@@ -25,7 +24,6 @@ class ApiFormatXmlTest extends ApiFormatTestBase {
}
public static function provideGeneralEncoding() {
- // phpcs:disable Generic.Files.LineLength
return [
// Basic types
[ [ null, 'a' => null ], '<?xml version="1.0"?><api><_v _idx="0" /></api>' ],
diff --git a/tests/phpunit/includes/content/CssContentHandlerTest.php b/tests/phpunit/includes/content/CssContentHandlerTest.php
index 66adf738c837..728f01896c39 100644
--- a/tests/phpunit/includes/content/CssContentHandlerTest.php
+++ b/tests/phpunit/includes/content/CssContentHandlerTest.php
@@ -21,7 +21,6 @@ class CssContentHandlerTest extends MediaWikiLangTestCase {
* Keep this in sync with CssContentTest::provideGetRedirectTarget()
*/
public static function provideMakeRedirectContent() {
- // phpcs:disable Generic.Files.LineLength
return [
[
'MediaWiki:MonoBook.css',
diff --git a/tests/phpunit/includes/content/CssContentTest.php b/tests/phpunit/includes/content/CssContentTest.php
index 450af1bf9271..408d24c6511c 100644
--- a/tests/phpunit/includes/content/CssContentTest.php
+++ b/tests/phpunit/includes/content/CssContentTest.php
@@ -109,7 +109,6 @@ class CssContentTest extends TextContentTest {
* Keep this in sync with CssContentHandlerTest::provideMakeRedirectContent()
*/
public static function provideGetRedirectTarget() {
- // phpcs:disable Generic.Files.LineLength
return [
[ 'MediaWiki:MonoBook.css', "/* #REDIRECT */@import url(//example.org/w/index.php?title=MediaWiki:MonoBook.css&action=raw&ctype=text/css);" ],
[ 'User:FooBar/common.css', "/* #REDIRECT */@import url(//example.org/w/index.php?title=User:FooBar/common.css&action=raw&ctype=text/css);" ],
diff --git a/tests/phpunit/includes/content/JavaScriptContentHandlerTest.php b/tests/phpunit/includes/content/JavaScriptContentHandlerTest.php
index 6a22fa06325f..c76f5a07a261 100644
--- a/tests/phpunit/includes/content/JavaScriptContentHandlerTest.php
+++ b/tests/phpunit/includes/content/JavaScriptContentHandlerTest.php
@@ -21,7 +21,6 @@ class JavaScriptContentHandlerTest extends MediaWikiLangTestCase {
* Keep this in sync with JavaScriptContentTest::provideGetRedirectTarget()
*/
public static function provideMakeRedirectContent() {
- // phpcs:disable Generic.Files.LineLength
return [
[
'MediaWiki:MonoBook.js',
diff --git a/tests/phpunit/includes/content/JavaScriptContentTest.php b/tests/phpunit/includes/content/JavaScriptContentTest.php
index 05f1f11f79f7..e8fff1e5422e 100644
--- a/tests/phpunit/includes/content/JavaScriptContentTest.php
+++ b/tests/phpunit/includes/content/JavaScriptContentTest.php
@@ -223,7 +223,6 @@ class JavaScriptContentTest extends TextContentTest {
}
public static function provideUpdateRedirect() {
- // phpcs:disable Generic.Files.LineLength
return [
[
'#REDIRECT [[Someplace]]',
@@ -284,7 +283,6 @@ class JavaScriptContentTest extends TextContentTest {
* Keep this in sync with JavaScriptContentHandlerTest::provideMakeRedirectContent()
*/
public static function provideGetRedirectTarget() {
- // phpcs:disable Generic.Files.LineLength
return [
[
'MediaWiki:MonoBook.js',
diff --git a/tests/phpunit/includes/filerepo/file/LocalFileTest.php b/tests/phpunit/includes/filerepo/file/LocalFileTest.php
index a05d6fb065ac..6c3ddca2f432 100644
--- a/tests/phpunit/includes/filerepo/file/LocalFileTest.php
+++ b/tests/phpunit/includes/filerepo/file/LocalFileTest.php
@@ -522,31 +522,26 @@ class LocalFileTest extends MediaWikiIntegrationTestCase {
public function provideLoadFromDBAndCache() {
return [
'legacy' => [
- // phpcs:ignore Generic.Files.LineLength
'a:6:{s:10:"frameCount";i:0;s:9:"loopCount";i:1;s:8:"duration";d:0;s:8:"bitDepth";i:16;s:9:"colorType";s:10:"truecolour";s:8:"metadata";a:2:{s:8:"DateTime";s:19:"2019:07:30 13:52:32";s:15:"_MW_PNG_VERSION";i:1;}}',
[],
false,
],
'json' => [
- // phpcs:ignore Generic.Files.LineLength
'{"data":{"frameCount":0,"loopCount":1,"duration":0,"bitDepth":16,"colorType":"truecolour","metadata":{"DateTime":"2019:07:30 13:52:32","_MW_PNG_VERSION":1}}}',
[],
false,
],
'json with blobs' => [
- // phpcs:ignore Generic.Files.LineLength
'{"blobs":{"colorType":"__BLOB0__"},"data":{"frameCount":0,"loopCount":1,"duration":0,"bitDepth":16,"metadata":{"DateTime":"2019:07:30 13:52:32","_MW_PNG_VERSION":1}}}',
[ '"truecolour"' ],
false,
],
'large (>100KB triggers uncached case)' => [
- // phpcs:ignore Generic.Files.LineLength
'{"data":{"large":"' . str_repeat( 'x', 102401 ) . '","frameCount":0,"loopCount":1,"duration":0,"bitDepth":16,"colorType":"truecolour","metadata":{"DateTime":"2019:07:30 13:52:32","_MW_PNG_VERSION":1}}}',
[],
102401,
],
'large json blob' => [
- // phpcs:ignore Generic.Files.LineLength
'{"blobs":{"large":"__BLOB0__"},"data":{"frameCount":0,"loopCount":1,"duration":0,"bitDepth":16,"colorType":"truecolour","metadata":{"DateTime":"2019:07:30 13:52:32","_MW_PNG_VERSION":1}}}',
[ '"' . str_repeat( 'x', 102401 ) . '"' ],
102401,
diff --git a/tests/phpunit/includes/import/ImportTest.php b/tests/phpunit/includes/import/ImportTest.php
index 933dc6eaa0fe..b8f7078366aa 100644
--- a/tests/phpunit/includes/import/ImportTest.php
+++ b/tests/phpunit/includes/import/ImportTest.php
@@ -33,7 +33,6 @@ class ImportTest extends MediaWikiLangTestCase {
}
public function getUnknownTagsXML() {
- // phpcs:disable Generic.Files.LineLength
return [
[
<<< EOF
@@ -97,7 +96,6 @@ EOF
}
public function getRedirectXML() {
- // phpcs:disable Generic.Files.LineLength
return [
[
<<< EOF
@@ -179,7 +177,6 @@ EOF
}
public function getSiteInfoXML() {
- // phpcs:disable Generic.Files.LineLength
return [
[
<<< EOF
@@ -244,8 +241,6 @@ EOF
$user = $this->getTestUser()->getUser();
$n = ( $assign ? 1 : 0 ) + ( $create ? 2 : 0 );
-
- // phpcs:disable Generic.Files.LineLength
$source = new ImportStringSource( <<<EOF
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.10/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/ http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10" xml:lang="en">
<page>
diff --git a/tests/phpunit/includes/media/ExifBitmapTest.php b/tests/phpunit/includes/media/ExifBitmapTest.php
index e21da7571d3e..88536ea70db9 100644
--- a/tests/phpunit/includes/media/ExifBitmapTest.php
+++ b/tests/phpunit/includes/media/ExifBitmapTest.php
@@ -35,18 +35,15 @@ class ExifBitmapTest extends MediaWikiMediaTestCase {
ExifBitmapHandler::METADATA_BAD
],
'good' => [
- // phpcs:ignore Generic.Files.LineLength
'a:16:{s:10:"ImageWidth";i:20;s:11:"ImageLength";i:20;s:13:"BitsPerSample";a:3:{i:0;i:8;i:1;i:8;i:2;i:8;}s:11:"Compression";i:5;s:25:"PhotometricInterpretation";i:2;s:16:"ImageDescription";s:17:"Created with GIMP";s:12:"StripOffsets";i:8;s:11:"Orientation";i:1;s:15:"SamplesPerPixel";i:3;s:12:"RowsPerStrip";i:64;s:15:"StripByteCounts";i:238;s:11:"XResolution";s:19:"1207959552/16777216";s:11:"YResolution";s:19:"1207959552/16777216";s:19:"PlanarConfiguration";i:1;s:14:"ResolutionUnit";i:2;s:22:"MEDIAWIKI_EXIF_VERSION";i:2;}',
ExifBitmapHandler::METADATA_GOOD
],
'old good' => [
- // phpcs:ignore Generic.Files.LineLength
'a:16:{s:10:"ImageWidth";i:20;s:11:"ImageLength";i:20;s:13:"BitsPerSample";a:3:{i:0;i:8;i:1;i:8;i:2;i:8;}s:11:"Compression";i:5;s:25:"PhotometricInterpretation";i:2;s:16:"ImageDescription";s:17:"Created with GIMP";s:12:"StripOffsets";i:8;s:11:"Orientation";i:1;s:15:"SamplesPerPixel";i:3;s:12:"RowsPerStrip";i:64;s:15:"StripByteCounts";i:238;s:11:"XResolution";s:19:"1207959552/16777216";s:11:"YResolution";s:19:"1207959552/16777216";s:19:"PlanarConfiguration";i:1;s:14:"ResolutionUnit";i:2;s:22:"MEDIAWIKI_EXIF_VERSION";i:1;}',
ExifBitmapHandler::METADATA_COMPATIBLE
],
// Handle metadata from paged tiff handler (gotten via instant commons) gracefully.
'paged tiff' => [
- // phpcs:ignore Generic.Files.LineLength
'a:6:{s:9:"page_data";a:1:{i:1;a:5:{s:5:"width";i:643;s:6:"height";i:448;s:5:"alpha";s:4:"true";s:4:"page";i:1;s:6:"pixels";i:288064;}}s:10:"page_count";i:1;s:10:"first_page";i:1;s:9:"last_page";i:1;s:4:"exif";a:9:{s:10:"ImageWidth";i:643;s:11:"ImageLength";i:448;s:11:"Compression";i:5;s:25:"PhotometricInterpretation";i:2;s:11:"Orientation";i:1;s:15:"SamplesPerPixel";i:4;s:12:"RowsPerStrip";i:50;s:19:"PlanarConfiguration";i:1;s:22:"MEDIAWIKI_EXIF_VERSION";i:1;}s:21:"TIFF_METADATA_VERSION";s:3:"1.4";}',
ExifBitmapHandler::METADATA_BAD
],
diff --git a/tests/phpunit/includes/media/GIFHandlerTest.php b/tests/phpunit/includes/media/GIFHandlerTest.php
index b9059e32a834..7345212bde40 100644
--- a/tests/phpunit/includes/media/GIFHandlerTest.php
+++ b/tests/phpunit/includes/media/GIFHandlerTest.php
@@ -80,7 +80,6 @@ class GIFHandlerTest extends MediaWikiMediaTestCase {
}
public function provideIsFileMetadataValid() {
- // phpcs:disable Generic.Files.LineLength
return [
[ '0', GIFHandler::METADATA_GOOD ],
[ '', GIFHandler::METADATA_BAD ],
@@ -107,7 +106,6 @@ class GIFHandlerTest extends MediaWikiMediaTestCase {
}
public static function provideGetSizeAndMetadata() {
- // phpcs:disable Generic.Files.LineLength
return [
[
'nonanimated.gif',
diff --git a/tests/phpunit/includes/media/PNGHandlerTest.php b/tests/phpunit/includes/media/PNGHandlerTest.php
index 1b429848eb38..20f718219489 100644
--- a/tests/phpunit/includes/media/PNGHandlerTest.php
+++ b/tests/phpunit/includes/media/PNGHandlerTest.php
@@ -85,7 +85,6 @@ class PNGHandlerTest extends MediaWikiMediaTestCase {
}
public function provideIsMetadataValid() {
- // phpcs:disable Generic.Files.LineLength
return [
[ '0', PNGHandler::METADATA_GOOD ],
[ '', PNGHandler::METADATA_BAD ],
diff --git a/tests/phpunit/includes/media/SVGReaderTest.php b/tests/phpunit/includes/media/SVGReaderTest.php
index ed0fa16f5f5c..1170520a1be3 100644
--- a/tests/phpunit/includes/media/SVGReaderTest.php
+++ b/tests/phpunit/includes/media/SVGReaderTest.php
@@ -146,7 +146,6 @@ class SVGReaderTest extends \MediaWikiIntegrationTestCase {
public static function provideSvgFilesWithXMLMetadata() {
$base = __DIR__ . '/../../data/media';
- // phpcs:disable Generic.Files.LineLength
$metadata = '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<ns4:Work xmlns:ns4="http://creativecommons.org/ns#" rdf:about="">
<ns5:format xmlns:ns5="http://purl.org/dc/elements/1.1/">image/svg+xml</ns5:format>
diff --git a/tests/phpunit/includes/media/WebPHandlerTest.php b/tests/phpunit/includes/media/WebPHandlerTest.php
index dd773e422a8a..927174fb851d 100644
--- a/tests/phpunit/includes/media/WebPHandlerTest.php
+++ b/tests/phpunit/includes/media/WebPHandlerTest.php
@@ -26,7 +26,6 @@ class WebPHandlerTest extends MediaWikiIntegrationTestCase {
}
public function provideTestExtractMetaData() {
- // phpcs:disable Generic.Files.LineLength
return [
// Files from https://developers.google.com/speed/webp/gallery2
[ "\x52\x49\x46\x46\x90\x68\x01\x00\x57\x45\x42\x50\x56\x50\x38\x4C\x83\x68\x01\x00\x2F\x8F\x01\x4B\x10\x8D\x38\x6C\xDB\x46\x92\xE0\xE0\x82\x7B\x6C",
diff --git a/tests/phpunit/includes/page/WikiPageDbTest.php b/tests/phpunit/includes/page/WikiPageDbTest.php
index a4a4911e250a..32d6f7a2555d 100644
--- a/tests/phpunit/includes/page/WikiPageDbTest.php
+++ b/tests/phpunit/includes/page/WikiPageDbTest.php
@@ -903,9 +903,7 @@ class WikiPageDbTest extends MediaWikiLangTestCase {
[
'WikiPageTest_testGetRedirectTarget_4',
CONTENT_MODEL_WIKITEXT,
- // phpcs:ignore Generic.Files.LineLength
'#REDIRECT [[Foobar#🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿]]',
- // phpcs:ignore Generic.Files.LineLength
'Foobar#🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬󠁦󠁲󠁿🏴󠁮󠁬...'
]
];
diff --git a/tests/phpunit/includes/parser/ParserOutputTest.php b/tests/phpunit/includes/parser/ParserOutputTest.php
index b4480a36cc58..0920b15d3f11 100644
--- a/tests/phpunit/includes/parser/ParserOutputTest.php
+++ b/tests/phpunit/includes/parser/ParserOutputTest.php
@@ -258,7 +258,6 @@ class ParserOutputTest extends MediaWikiLangTestCase {
}
public static function provideGetTextToC() {
- // phpcs:disable Generic.Files.LineLength
$toc = <<<EOF
<div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
<ul>
@@ -278,7 +277,6 @@ EOF;
// REMOVE THIS ONCE Parser::TOC_START IS REMOVED
public static function provideGetTextBackCompat() {
- // phpcs:disable Generic.Files.LineLength
$toc = self::provideGetTextToc();
$text = <<<EOF
<p>Test document.
@@ -383,7 +381,6 @@ EOF
}
public static function provideGetText() {
- // phpcs:disable Generic.Files.LineLength
$toc = self::provideGetTextToc();
$text = <<<EOF
<p>Test document.
diff --git a/tests/phpunit/includes/parser/PreprocessorTest.php b/tests/phpunit/includes/parser/PreprocessorTest.php
index 6490ff5525df..3b8b7f216667 100644
--- a/tests/phpunit/includes/parser/PreprocessorTest.php
+++ b/tests/phpunit/includes/parser/PreprocessorTest.php
@@ -44,7 +44,6 @@ class PreprocessorTest extends MediaWikiIntegrationTestCase {
}
public static function provideCases() {
- // phpcs:disable Generic.Files.LineLength
return [
[ "Foo", "<root>Foo</root>" ],
[ "<!-- Foo -->", "<root><comment>&lt;!-- Foo --&gt;</comment></root>" ],
@@ -185,7 +184,6 @@ class PreprocessorTest extends MediaWikiIntegrationTestCase {
* These are more complex test cases taken out of wiki articles.
*/
public static function provideFiles() {
- // phpcs:disable Generic.Files.LineLength
return [
[ "QuoteQuran" ], # https://en.wikipedia.org/w/index.php?title=Template:QuoteQuran/sandbox&oldid=237348988 GFDL + CC BY-SA by Striver
[ "Factorial" ], # https://en.wikipedia.org/w/index.php?title=Template:Factorial&oldid=98548758 GFDL + CC BY-SA by Polonium
@@ -219,7 +217,6 @@ class PreprocessorTest extends MediaWikiIntegrationTestCase {
* Tests from T30642 · https://phabricator.wikimedia.org/T30642
*/
public static function provideHeadings() {
- // phpcs:disable Generic.Files.LineLength
return [
/* These should become headings: */
[ "== h ==<!--c1-->", "<root><h level=\"2\" i=\"1\">== h ==<comment>&lt;!--c1--&gt;</comment></h></root>" ],
diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
index 6cf7ef69ff0d..603b5d51c51a 100644
--- a/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
+++ b/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
@@ -102,8 +102,6 @@ class ResourceLoaderClientHtmlTest extends PHPUnit\Framework\TestCase {
$client->setExemptStates( [
'test.exempt' => 'ready',
] );
-
- // phpcs:disable Generic.Files.LineLength
$expected = '<script>'
. 'document.documentElement.className="client-js";'
. 'RLCONF={"key":"value"};'
@@ -130,8 +128,6 @@ class ResourceLoaderClientHtmlTest extends PHPUnit\Framework\TestCase {
self::makeContext(),
[ 'target' => 'example' ]
);
-
- // phpcs:disable Generic.Files.LineLength
$expected = '<script>document.documentElement.className="client-js";</script>' . "\n"
. '<script async="" src="/w/load.php?lang=nl&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;target=example"></script>';
// phpcs:enable
@@ -147,8 +143,6 @@ class ResourceLoaderClientHtmlTest extends PHPUnit\Framework\TestCase {
self::makeContext(),
[ 'safemode' => '1' ]
);
-
- // phpcs:disable Generic.Files.LineLength
$expected = '<script>document.documentElement.className="client-js";</script>' . "\n"
. '<script async="" src="/w/load.php?lang=nl&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;safemode=1"></script>';
// phpcs:enable
@@ -164,8 +158,6 @@ class ResourceLoaderClientHtmlTest extends PHPUnit\Framework\TestCase {
self::makeContext(),
[ 'target' => null ]
);
-
- // phpcs:disable Generic.Files.LineLength
$expected = '<script>document.documentElement.className="client-js";</script>' . "\n"
. '<script async="" src="/w/load.php?lang=nl&amp;modules=startup&amp;only=scripts&amp;raw=1"></script>';
// phpcs:enable
@@ -186,7 +178,6 @@ class ResourceLoaderClientHtmlTest extends PHPUnit\Framework\TestCase {
$client->setModuleStyles( [
'test.styles.deprecated',
] );
- // phpcs:disable Generic.Files.LineLength
$expected = '<script>(RLQ=window.RLQ||[]).push(function(){'
. 'mw.log.warn("This page is using the deprecated ResourceLoader module \"test.styles.deprecated\".\nDeprecation message.");'
. '});</script>';
@@ -196,7 +187,6 @@ class ResourceLoaderClientHtmlTest extends PHPUnit\Framework\TestCase {
}
public static function provideMakeLoad() {
- // phpcs:disable Generic.Files.LineLength
return [
[
'context' => [],
diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderSkinModuleTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderSkinModuleTest.php
index 9eb959ebb5cb..48deb71b48b1 100644
--- a/tests/phpunit/includes/resourceloader/ResourceLoaderSkinModuleTest.php
+++ b/tests/phpunit/includes/resourceloader/ResourceLoaderSkinModuleTest.php
@@ -163,7 +163,6 @@ class ResourceLoaderSkinModuleTest extends ResourceLoaderTestCase {
}
public static function provideGetStyles() {
- // phpcs:disable Generic.Files.LineLength
return [
[
'parent' => [],
diff --git a/tests/phpunit/includes/upload/UploadBaseTest.php b/tests/phpunit/includes/upload/UploadBaseTest.php
index 41ea070fc9b0..2cbd1db59341 100644
--- a/tests/phpunit/includes/upload/UploadBaseTest.php
+++ b/tests/phpunit/includes/upload/UploadBaseTest.php
@@ -138,7 +138,6 @@ class UploadBaseTest extends MediaWikiIntegrationTestCase {
}
public static function provideCheckSvgScriptCallback() {
- // phpcs:disable Generic.Files.LineLength
return [
// html5sec SVG vectors
[
diff --git a/tests/phpunit/includes/utils/MWCryptHKDFTest.php b/tests/phpunit/includes/utils/MWCryptHKDFTest.php
index 4957390848b3..729d1e8d635b 100644
--- a/tests/phpunit/includes/utils/MWCryptHKDFTest.php
+++ b/tests/phpunit/includes/utils/MWCryptHKDFTest.php
@@ -40,7 +40,6 @@ class MWCryptHKDFTest extends MediaWikiIntegrationTestCase {
* Test vectors from Appendix A on https://tools.ietf.org/html/rfc5869
*/
public static function providerRfc5869() {
- // phpcs:disable Generic.Files.LineLength
return [
// A.1
[
diff --git a/tests/phpunit/integration/includes/CommentFormatter/CommentParserTest.php b/tests/phpunit/integration/includes/CommentFormatter/CommentParserTest.php
index b8b2f17672d7..5e43866a3623 100644
--- a/tests/phpunit/integration/includes/CommentFormatter/CommentParserTest.php
+++ b/tests/phpunit/integration/includes/CommentFormatter/CommentParserTest.php
@@ -72,8 +72,6 @@ class CommentParserTest extends \MediaWikiIntegrationTestCase {
*/
public function provideFormatComment() {
$wikiId = 'enwiki'; // $wgConf has a fake entry for this
-
- // phpcs:disable Generic.Files.LineLength
return [
// Linker::formatComment
[
@@ -319,7 +317,6 @@ class CommentParserTest extends \MediaWikiIntegrationTestCase {
* Adapted from LinkerTest
*/
public static function provideFormatLinksInComment() {
- // phpcs:disable Generic.Files.LineLength
return [
[
'foo bar <a href="/wiki/Special:BlankPage" title="Special:BlankPage">Special:BlankPage</a>',
@@ -390,7 +387,6 @@ class CommentParserTest extends \MediaWikiIntegrationTestCase {
] );
$expected = [
'<a href="/index.php/Present" title="Present">Present</a>',
- // phpcs:ignore Generic.Files.LineLength
'<a href="/index.php?title=Absent&amp;action=edit&amp;redlink=1" class="new" title="Absent (page does not exist)">Absent</a>'
];
$this->assertSame( $expected, $result );
diff --git a/tests/phpunit/languages/LanguageIntegrationTest.php b/tests/phpunit/languages/LanguageIntegrationTest.php
index a26269dcba62..d33e908f2061 100644
--- a/tests/phpunit/languages/LanguageIntegrationTest.php
+++ b/tests/phpunit/languages/LanguageIntegrationTest.php
@@ -1363,7 +1363,6 @@ class LanguageIntegrationTest extends LanguageClassesTestCase {
}
public static function provideCheckTitleEncodingData() {
- // phpcs:disable Generic.Files.LineLength
return [
[ "" ],
[ "United States of America" ], // 7bit ASCII
diff --git a/tests/phpunit/maintenance/backupPrefetchTest.php b/tests/phpunit/maintenance/backupPrefetchTest.php
index 224aaeaf8d94..39f6b6657409 100644
--- a/tests/phpunit/maintenance/backupPrefetchTest.php
+++ b/tests/phpunit/maintenance/backupPrefetchTest.php
@@ -166,7 +166,6 @@ class BaseDumpTest extends MediaWikiIntegrationTestCase {
$fname = $this->getNewTempFile();
// The header of every prefetch file
- // phpcs:ignore Generic.Files.LineLength
$header = '<mediawiki>
<siteinfo>
<sitename>wikisvn</sitename>
diff --git a/tests/phpunit/unit/includes/ParamValidator/TypeDef/NamespaceDefTest.php b/tests/phpunit/unit/includes/ParamValidator/TypeDef/NamespaceDefTest.php
index 5f3d397bbc53..9c9636e8ca4e 100644
--- a/tests/phpunit/unit/includes/ParamValidator/TypeDef/NamespaceDefTest.php
+++ b/tests/phpunit/unit/includes/ParamValidator/TypeDef/NamespaceDefTest.php
@@ -262,7 +262,6 @@ class NamespaceDefTest extends TypeDefTestCase {
[],
[ 'type' => 'namespace' ],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-enum"><text>1</text><list listType="comma"><text>0</text><text>1</text><text>2</text><text>3</text><text>4</text><text>5</text><text>6</text><text>7</text><text>8</text><text>9</text><text>10</text><text>11</text><text>12</text><text>13</text><text>14</text><text>15</text></list><num>16</num></message>',
ParamValidator::PARAM_ISMULTI => null,
],
@@ -275,7 +274,6 @@ class NamespaceDefTest extends TypeDefTestCase {
],
[ 'type' => 'namespace', 'extranamespaces' => [ NS_SPECIAL, NS_MEDIA ] ],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-enum"><text>1</text><list listType="comma"><text>-1</text><text>-2</text><text>0</text><text>1</text><text>2</text><text>3</text><text>4</text><text>5</text><text>6</text><text>7</text><text>8</text><text>9</text><text>10</text><text>11</text><text>12</text><text>13</text><text>14</text><text>15</text></list><num>18</num></message>',
ParamValidator::PARAM_ISMULTI => null,
],
@@ -291,7 +289,6 @@ class NamespaceDefTest extends TypeDefTestCase {
],
],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-enum"><text>1</text><list listType="comma"><text>-1</text><text>-2</text><text>0</text><text>1</text><text>2</text><text>3</text><text>4</text><text>5</text><text>6</text><text>7</text><text>8</text><text>9</text><text>10</text><text>11</text><text>12</text><text>13</text><text>14</text><text>15</text></list><num>18</num></message>',
ParamValidator::PARAM_ISMULTI => null,
],
diff --git a/tests/phpunit/unit/includes/ParamValidator/TypeDef/UserDefTest.php b/tests/phpunit/unit/includes/ParamValidator/TypeDef/UserDefTest.php
index 03494c67c79b..e9c80d7ec372 100644
--- a/tests/phpunit/unit/includes/ParamValidator/TypeDef/UserDefTest.php
+++ b/tests/phpunit/unit/includes/ParamValidator/TypeDef/UserDefTest.php
@@ -364,7 +364,6 @@ class UserDefTest extends TypeDefTestCase {
'subtypes' => [ 'name', 'ip', 'cidr', 'interwiki' ],
],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-user"><text>1</text><list listType="text"><text><message key="paramvalidator-help-type-user-subtype-name"></message></text><text><message key="paramvalidator-help-type-user-subtype-ip"></message></text><text><message key="paramvalidator-help-type-user-subtype-cidr"></message></text><text><message key="paramvalidator-help-type-user-subtype-interwiki"></message></text></list><num>4</num></message>',
],
],
@@ -378,7 +377,6 @@ class UserDefTest extends TypeDefTestCase {
'subtypes' => [ 'name', 'id' ],
],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-user"><text>2</text><list listType="text"><text><message key="paramvalidator-help-type-user-subtype-name"></message></text><text><message key="paramvalidator-help-type-user-subtype-id"></message></text></list><num>2</num></message>',
],
],
diff --git a/tests/phpunit/unit/includes/language/LCStoreStaticArrayTest.php b/tests/phpunit/unit/includes/language/LCStoreStaticArrayTest.php
index 32a78b188ea7..8a1234f6e154 100644
--- a/tests/phpunit/unit/includes/language/LCStoreStaticArrayTest.php
+++ b/tests/phpunit/unit/includes/language/LCStoreStaticArrayTest.php
@@ -1,5 +1,4 @@
<?php
-// phpcs:disable Generic.Files.LineLength.TooLong
/**
* @covers LCStoreStaticArray
diff --git a/tests/phpunit/unit/includes/libs/ParamValidator/ParamValidatorTest.php b/tests/phpunit/unit/includes/libs/ParamValidator/ParamValidatorTest.php
index 8178b2365cd1..c814f2b48260 100644
--- a/tests/phpunit/unit/includes/libs/ParamValidator/ParamValidatorTest.php
+++ b/tests/phpunit/unit/includes/libs/ParamValidator/ParamValidatorTest.php
@@ -335,7 +335,6 @@ class ParamValidatorTest extends \PHPUnit\Framework\TestCase {
],
[
'issues' => [
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_ISMULTI_LIMIT2 => 'PARAM_ISMULTI_LIMIT2 must be greater than or equal to PARAM_ISMULTI_LIMIT1, but 10 < 100',
],
'allowedKeys' => $multiKeys,
@@ -1093,7 +1092,6 @@ class ParamValidatorTest extends \PHPUnit\Framework\TestCase {
[
ParamValidator::PARAM_DEPRECATED => '<message key="paramvalidator-help-deprecated"></message>',
ParamValidator::PARAM_REQUIRED => '<message key="paramvalidator-help-required"></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_DEFAULT => '<message key="paramvalidator-help-default"><plaintext>1234</plaintext></message>',
],
],
@@ -1105,13 +1103,9 @@ class ParamValidatorTest extends \PHPUnit\Framework\TestCase {
ParamValidator::PARAM_DEFAULT => '',
],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_ISMULTI => '<message key="paramvalidator-help-multi-separate"></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_ISMULTI_LIMIT1 => '<message key="paramvalidator-help-multi-max"><num>50</num><num>500</num></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_ALL => '<message key="paramvalidator-help-multi-all"><plaintext>*</plaintext></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_DEFAULT => '<message key="paramvalidator-help-default-empty"></message>',
],
],
@@ -1120,9 +1114,7 @@ class ParamValidatorTest extends \PHPUnit\Framework\TestCase {
ParamValidator::PARAM_ISMULTI => true,
],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_ISMULTI => '<message key="paramvalidator-help-multi-separate"></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_ISMULTI_LIMIT1 => '<message key="paramvalidator-help-multi-max"><num>50</num><num>500</num></message>',
],
[],
@@ -1136,11 +1128,8 @@ class ParamValidatorTest extends \PHPUnit\Framework\TestCase {
ParamValidator::PARAM_ALL => 'all',
],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_ISMULTI => '<message key="paramvalidator-help-multi-separate"></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_ISMULTI_LIMIT1 => '<message key="paramvalidator-help-multi-max"><num>10</num><num>15</num></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_ALL => '<message key="paramvalidator-help-multi-all"><plaintext>all</plaintext></message>',
],
],
@@ -1150,9 +1139,7 @@ class ParamValidatorTest extends \PHPUnit\Framework\TestCase {
ParamValidator::PARAM_ISMULTI_LIMIT2 => 10,
],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_ISMULTI => '<message key="paramvalidator-help-multi-separate"></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_ISMULTI_LIMIT1 => '<message key="paramvalidator-help-multi-max-simple"><num>50</num></message>',
],
],
@@ -1164,7 +1151,6 @@ class ParamValidatorTest extends \PHPUnit\Framework\TestCase {
ParamValidator::PARAM_ISMULTI_LIMIT2 => 2,
],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_ISMULTI => '<message key="paramvalidator-help-multi-separate"></message>',
],
],
@@ -1176,9 +1162,7 @@ class ParamValidatorTest extends \PHPUnit\Framework\TestCase {
ParamValidator::PARAM_ISMULTI_LIMIT2 => 10,
],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_ISMULTI => '<message key="paramvalidator-help-multi-separate"></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_ISMULTI_LIMIT1 => '<message key="paramvalidator-help-multi-max"><num>4</num><num>10</num></message>',
],
],
@@ -1191,9 +1175,7 @@ class ParamValidatorTest extends \PHPUnit\Framework\TestCase {
ParamValidator::PARAM_ALLOW_DUPLICATES => true,
],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_ISMULTI => '<message key="paramvalidator-help-multi-separate"></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_ISMULTI_LIMIT1 => '<message key="paramvalidator-help-multi-max-simple"><num>4</num></message>',
],
],
@@ -1206,10 +1188,8 @@ class ParamValidatorTest extends \PHPUnit\Framework\TestCase {
[
ParamValidator::PARAM_REQUIRED => '<message key="paramvalidator-help-required"></message>',
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-help"></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_ISMULTI_LIMIT1 => '<message key="paramvalidator-help-multi-max"><num>50</num><num>500</num></message>',
'foobar' => '<message key="foobaz"></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_DEFAULT => '<message key="paramvalidator-help-default"><text>XX</text></message>',
],
[
diff --git a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/BooleanDefTest.php b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/BooleanDefTest.php
index 744b4e373f60..0dc242732614 100644
--- a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/BooleanDefTest.php
+++ b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/BooleanDefTest.php
@@ -59,7 +59,6 @@ class BooleanDefTest extends TypeDefTestCase {
[],
[],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-boolean"><text>1</text></message>',
],
],
@@ -67,7 +66,6 @@ class BooleanDefTest extends TypeDefTestCase {
[ ParamValidator::PARAM_ISMULTI => true ],
[],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-boolean"><text>2</text></message>',
],
],
diff --git a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/EnumDefTest.php b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/EnumDefTest.php
index b42ff76380cf..6c4c2a775f2b 100644
--- a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/EnumDefTest.php
+++ b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/EnumDefTest.php
@@ -118,7 +118,6 @@ class EnumDefTest extends TypeDefTestCase {
[
'issues' => [
'X',
- // phpcs:disable Generic.Files.LineLength
'Values in PARAM_DEPRECATED_VALUES must be null, true, or MessageValue, but value for "c" is false',
'Values in PARAM_DEPRECATED_VALUES must be null, true, or MessageValue, but value for "f" is string',
'Values in PARAM_DEPRECATED_VALUES must be null, true, or MessageValue, but value for "g" is ' . static::class,
@@ -161,7 +160,6 @@ class EnumDefTest extends TypeDefTestCase {
'type' => [ 'a', 'b', 'c', 'd' ],
],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-enum"><text>1</text><list listType="comma"><text>a</text><text>b</text><text>c</text><text>d</text></list><num>4</num></message>',
ParamValidator::PARAM_ISMULTI => null,
],
@@ -175,7 +173,6 @@ class EnumDefTest extends TypeDefTestCase {
'type' => [ 'a', 'b', 'c', 'd' ],
],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-enum"><text>2</text><list listType="comma"><text>a</text><text>b</text><text>c</text><text>d</text></list><num>4</num></message>',
ParamValidator::PARAM_ISMULTI => null,
],
@@ -190,7 +187,6 @@ class EnumDefTest extends TypeDefTestCase {
'deprecatedvalues' => [ 'b', 'c' ],
],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-enum"><text>1</text><list listType="comma"><text>a</text><text>d</text><text>b</text><text>c</text></list><num>4</num></message>',
ParamValidator::PARAM_ISMULTI => null,
],
@@ -204,7 +200,6 @@ class EnumDefTest extends TypeDefTestCase {
'type' => [ 'a', 'b', 'c', 'd' ],
],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-enum"><text>1</text><list listType="comma"><text>a</text><text>b</text><text>c</text><text>d</text></list><num>4</num></message>',
ParamValidator::PARAM_ISMULTI => null,
],
@@ -217,7 +212,6 @@ class EnumDefTest extends TypeDefTestCase {
'type' => [ '', 'a', 'b', 'c', 'd' ],
],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-enum"><text>1</text><text><message key="paramvalidator-help-type-enum-can-be-empty"><list listType="comma"><text>a</text><text>b</text><text>c</text><text>d</text></list><num>4</num></message></text><num>5</num></message>',
ParamValidator::PARAM_ISMULTI => null,
],
diff --git a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/ExpiryDefTest.php b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/ExpiryDefTest.php
index d2e8a613b885..a146a7acd082 100644
--- a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/ExpiryDefTest.php
+++ b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/ExpiryDefTest.php
@@ -137,7 +137,6 @@ class ExpiryDefTest extends TypeDefTestCase {
[],
[],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
'param-type' => '<message key="paramvalidator-help-type-expiry"><text>1</text><list listType="text"><text>&quot;infinite&quot;</text><text>&quot;indefinite&quot;</text><text>&quot;infinity&quot;</text><text>&quot;never&quot;</text></list></message>'
]
]
diff --git a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/FloatDefTest.php b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/FloatDefTest.php
index 63163e93a271..446711313ef3 100644
--- a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/FloatDefTest.php
+++ b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/FloatDefTest.php
@@ -160,7 +160,6 @@ class FloatDefTest extends TypeDefTestCase {
[],
[ 'min' => null, 'max' => null ],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-float"><text>1</text></message>',
],
],
@@ -172,9 +171,7 @@ class FloatDefTest extends TypeDefTestCase {
],
[ 'min' => 1, 'max' => 100 ],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
FloatDef::PARAM_MIN => '<message key="paramvalidator-help-type-number-minmax"><text>2</text><num>1</num><num>100</num></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-float"><text>2</text></message>',
],
],
diff --git a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/IntegerDefTest.php b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/IntegerDefTest.php
index 6e47a1548ccc..69b4f1bda07e 100644
--- a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/IntegerDefTest.php
+++ b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/IntegerDefTest.php
@@ -264,7 +264,6 @@ class IntegerDefTest extends TypeDefTestCase {
[],
[ 'min' => null, 'max' => null ],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-integer"><text>1</text></message>',
],
],
@@ -272,9 +271,7 @@ class IntegerDefTest extends TypeDefTestCase {
[ IntegerDef::PARAM_MIN => 0, ParamValidator::PARAM_ISMULTI => true ],
[ 'min' => 0, 'max' => null ],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
IntegerDef::PARAM_MIN => '<message key="paramvalidator-help-type-number-min"><text>2</text><num>0</num><text>∞</text></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-integer"><text>2</text></message>',
],
],
@@ -282,9 +279,7 @@ class IntegerDefTest extends TypeDefTestCase {
[ IntegerDef::PARAM_MAX => 2 ],
[ 'min' => null, 'max' => 2 ],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
IntegerDef::PARAM_MIN => '<message key="paramvalidator-help-type-number-max"><text>1</text><text>−∞</text><num>2</num></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-integer"><text>1</text></message>',
],
],
@@ -292,9 +287,7 @@ class IntegerDefTest extends TypeDefTestCase {
[ IntegerDef::PARAM_MAX => 2, IntegerDef::PARAM_MAX2 => 4 ],
[ 'min' => null, 'max' => 2, 'highmax' => 4 ],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
IntegerDef::PARAM_MIN => '<message key="paramvalidator-help-type-number-max"><text>1</text><text>−∞</text><num>2</num></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-integer"><text>1</text></message>',
],
],
@@ -302,9 +295,7 @@ class IntegerDefTest extends TypeDefTestCase {
[ IntegerDef::PARAM_MAX => 2, IntegerDef::PARAM_MAX2 => 4 ],
[ 'min' => null, 'max' => 2, 'highmax' => 4 ],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
IntegerDef::PARAM_MIN => '<message key="paramvalidator-help-type-number-max"><text>1</text><text>−∞</text><num>4</num></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-integer"><text>1</text></message>',
],
[ 'useHighLimits' => true ],
@@ -313,9 +304,7 @@ class IntegerDefTest extends TypeDefTestCase {
[ IntegerDef::PARAM_MIN => 0, IntegerDef::PARAM_MAX => 2 ],
[ 'min' => 0, 'max' => 2 ],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
IntegerDef::PARAM_MIN => '<message key="paramvalidator-help-type-number-minmax"><text>1</text><num>0</num><num>2</num></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-integer"><text>1</text></message>',
],
],
@@ -323,9 +312,7 @@ class IntegerDefTest extends TypeDefTestCase {
[ IntegerDef::PARAM_MIN => 0, IntegerDef::PARAM_MAX => 2, IntegerDef::PARAM_MAX2 => 4 ],
[ 'min' => 0, 'max' => 2, 'highmax' => 4 ],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
IntegerDef::PARAM_MIN => '<message key="paramvalidator-help-type-number-minmax"><text>1</text><num>0</num><num>2</num></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-integer"><text>1</text></message>',
],
],
@@ -336,9 +323,7 @@ class IntegerDefTest extends TypeDefTestCase {
],
[ 'min' => 0, 'max' => 2, 'highmax' => 4 ],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
IntegerDef::PARAM_MIN => '<message key="paramvalidator-help-type-number-minmax"><text>2</text><num>0</num><num>4</num></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-integer"><text>2</text></message>',
],
[ 'useHighLimits' => true ],
diff --git a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/LimitDefTest.php b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/LimitDefTest.php
index fab3dd7fa3d3..6ac9b95f43a3 100644
--- a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/LimitDefTest.php
+++ b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/LimitDefTest.php
@@ -175,9 +175,7 @@ class LimitDefTest extends TypeDefTestCase {
[],
[ 'min' => 0, 'max' => null ],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
LimitDef::PARAM_MIN => '<message key="paramvalidator-help-type-number-min"><text>1</text><num>0</num><text>∞</text></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-limit"><text>1</text></message>',
],
],
diff --git a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/PresenceBooleanDefTest.php b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/PresenceBooleanDefTest.php
index c9d2c617bd01..61589c8b3e02 100644
--- a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/PresenceBooleanDefTest.php
+++ b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/PresenceBooleanDefTest.php
@@ -135,7 +135,6 @@ class PresenceBooleanDefTest extends TypeDefTestCase {
[],
[ 'default' => null ],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-presenceboolean"><text>1</text></message>',
ParamValidator::PARAM_DEFAULT => null,
],
diff --git a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/StringDefTest.php b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/StringDefTest.php
index 5376e9207b77..603e3dd5dfce 100644
--- a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/StringDefTest.php
+++ b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/StringDefTest.php
@@ -153,9 +153,7 @@ class StringDefTest extends TypeDefTestCase {
[
'issues' => [
'X',
- // phpcs:ignore Generic.Files.LineLength
'PARAM_REQUIRED is set, allowEmptyWhenRequired is not set, and PARAM_MAX_BYTES is 0. That\'s impossible to satisfy.',
- // phpcs:ignore Generic.Files.LineLength
'PARAM_REQUIRED is set, allowEmptyWhenRequired is not set, and PARAM_MAX_CHARS is 0. That\'s impossible to satisfy.',
],
'allowedKeys' => $keys,
@@ -208,9 +206,7 @@ class StringDefTest extends TypeDefTestCase {
],
[ 'maxbytes' => 4, 'maxchars' => 2 ],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
StringDef::PARAM_MAX_BYTES => '<message key="paramvalidator-help-type-string-maxbytes"><num>4</num></message>',
- // phpcs:ignore Generic.Files.LineLength.TooLong
StringDef::PARAM_MAX_CHARS => '<message key="paramvalidator-help-type-string-maxchars"><num>2</num></message>',
],
],
diff --git a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/TimestampDefTest.php b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/TimestampDefTest.php
index 0c7cbac94eeb..ef5f39653bfc 100644
--- a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/TimestampDefTest.php
+++ b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/TimestampDefTest.php
@@ -193,7 +193,6 @@ class TimestampDefTest extends TypeDefTestCase {
[],
[],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-timestamp"><text>1</text></message>',
],
],
@@ -201,7 +200,6 @@ class TimestampDefTest extends TypeDefTestCase {
[ ParamValidator::PARAM_ISMULTI => true ],
[],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-timestamp"><text>2</text></message>',
],
],
diff --git a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/UploadDefTest.php b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/UploadDefTest.php
index 11a9659ea494..2ba571405a8e 100644
--- a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/UploadDefTest.php
+++ b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/UploadDefTest.php
@@ -253,7 +253,6 @@ class UploadDefTest extends TypeDefTestCase {
[],
[],
[
- // phpcs:ignore Generic.Files.LineLength.TooLong
ParamValidator::PARAM_TYPE => '<message key="paramvalidator-help-type-upload"></message>',
],
],
diff --git a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDefTest.php b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDefTest.php
index fbd2a5101915..2bbaeb9a0bc0 100644
--- a/tests/phpunit/unit/includes/libs/ParamValidator/TypeDefTest.php
+++ b/tests/phpunit/unit/includes/libs/ParamValidator/TypeDefTest.php
@@ -74,17 +74,14 @@ class TypeDefTest extends \PHPUnit\Framework\TestCase {
public static function provideFailureMessage() {
return [
'Basic' => [
- // phpcs:ignore Generic.Files.LineLength.TooLong
'<datamessage key="paramvalidator-foobar" code="foobar"></datamessage>',
'foobar',
],
'With data' => [
- // phpcs:ignore Generic.Files.LineLength.TooLong
'<datamessage key="paramvalidator-foobar" code="foobar"><data>{"x":123}</data></datamessage>',
'foobar', [ 'x' => 123 ]
],
'With suffix' => [
- // phpcs:ignore Generic.Files.LineLength.TooLong
'<datamessage key="paramvalidator-foobar-baz" code="foobar"><data>[]</data></datamessage>',
'foobar', [], 'baz'
],
@@ -139,12 +136,10 @@ class TypeDefTest extends \PHPUnit\Framework\TestCase {
public static function provideFailure() {
return [
'Basic' => [
- // phpcs:ignore Generic.Files.LineLength.TooLong
'<datamessage key="paramvalidator-foobar" code="foobar"><params><plaintext>test</plaintext><plaintext>1234</plaintext></params></datamessage>',
'foobar', 'test', 1234, [], []
],
'DataMessageValue' => [
- // phpcs:ignore Generic.Files.LineLength.TooLong
'<datamessage key="XXX-msg" code="foobar"><params><plaintext>test</plaintext><plaintext>XXX</plaintext><text>a</text><text>b</text><plaintext>pt</plaintext></params><data>{"data":"!!!"}</data></datamessage>',
DataMessageValue::new( 'XXX-msg', [ 'a', 'b' ], 'foobar', [ 'data' => '!!!' ] )
->plaintextParams( 'pt' ),
diff --git a/tests/phpunit/unit/includes/libs/XmlTypeCheckTest.php b/tests/phpunit/unit/includes/libs/XmlTypeCheckTest.php
index 079f24a4f804..8f7bf4f0f2b7 100644
--- a/tests/phpunit/unit/includes/libs/XmlTypeCheckTest.php
+++ b/tests/phpunit/unit/includes/libs/XmlTypeCheckTest.php
@@ -11,7 +11,6 @@ class XmlTypeCheckTest extends PHPUnit\Framework\TestCase {
private const WELL_FORMED_XML = "<root><child /></root>";
private const MAL_FORMED_XML = "<root><child /></error>";
- // phpcs:ignore Generic.Files.LineLength
private const XML_WITH_PIH = '<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/w/index.php"?><svg><child /></svg>';
/**
diff --git a/tests/phpunit/unit/includes/libs/http/SetCookieCompatTest.php b/tests/phpunit/unit/includes/libs/http/SetCookieCompatTest.php
index a2ca2adfab10..90d98a18feba 100644
--- a/tests/phpunit/unit/includes/libs/http/SetCookieCompatTest.php
+++ b/tests/phpunit/unit/includes/libs/http/SetCookieCompatTest.php
@@ -11,7 +11,6 @@ class SetCookieCompatTest extends TestCase {
public static function provideSetCookieEmulated() {
// Expected values are all copied from PHP 7.4
- // phpcs:disable Generic.Files.LineLength.TooLong
return [
'unrecognised key' => [
true, 'a', '',
diff --git a/tests/phpunit/unit/includes/libs/rdbms/database/DatabaseSQLTest.php b/tests/phpunit/unit/includes/libs/rdbms/database/DatabaseSQLTest.php
index 06364f65e2f4..38bc9db2d14d 100644
--- a/tests/phpunit/unit/includes/libs/rdbms/database/DatabaseSQLTest.php
+++ b/tests/phpunit/unit/includes/libs/rdbms/database/DatabaseSQLTest.php
@@ -1273,7 +1273,6 @@ class DatabaseSQLTest extends PHPUnit\Framework\TestCase {
}
public static function provideUnionConditionPermutations() {
- // phpcs:disable Generic.Files.LineLength
return [
[
[
@@ -1724,21 +1723,18 @@ class DatabaseSQLTest extends PHPUnit\Framework\TestCase {
$this->database->startAtomic( __METHOD__, IDatabase::ATOMIC_CANCELABLE );
$this->database->endAtomic( __METHOD__ );
$this->database->commit( __METHOD__ );
- // phpcs:ignore Generic.Files.LineLength
$this->assertLastSql( 'BEGIN; SAVEPOINT wikimedia_rdbms_atomic1; RELEASE SAVEPOINT wikimedia_rdbms_atomic1; COMMIT' );
$this->database->begin( __METHOD__ );
$this->database->startAtomic( __METHOD__, IDatabase::ATOMIC_CANCELABLE );
$this->database->cancelAtomic( __METHOD__ );
$this->database->commit( __METHOD__ );
- // phpcs:ignore Generic.Files.LineLength
$this->assertLastSql( 'BEGIN; SAVEPOINT wikimedia_rdbms_atomic1; ROLLBACK TO SAVEPOINT wikimedia_rdbms_atomic1; COMMIT' );
$this->database->startAtomic( __METHOD__, IDatabase::ATOMIC_CANCELABLE );
$this->database->startAtomic( __METHOD__, IDatabase::ATOMIC_CANCELABLE );
$this->database->cancelAtomic( __METHOD__ );
$this->database->endAtomic( __METHOD__ );
- // phpcs:ignore Generic.Files.LineLength
$this->assertLastSql( 'BEGIN; SAVEPOINT wikimedia_rdbms_atomic1; ROLLBACK TO SAVEPOINT wikimedia_rdbms_atomic1; COMMIT' );
$noOpCallack = static function () {
@@ -1753,7 +1749,6 @@ class DatabaseSQLTest extends PHPUnit\Framework\TestCase {
$this->database->begin( __METHOD__ );
$this->database->doAtomicSection( __METHOD__, $noOpCallack, IDatabase::ATOMIC_CANCELABLE );
$this->database->rollback( __METHOD__ );
- // phpcs:ignore Generic.Files.LineLength
$this->assertLastSql( 'BEGIN; SAVEPOINT wikimedia_rdbms_atomic1; RELEASE SAVEPOINT wikimedia_rdbms_atomic1; ROLLBACK' );
$fname = __METHOD__;
@@ -1954,7 +1949,6 @@ class DatabaseSQLTest extends PHPUnit\Framework\TestCase {
$this->assertSame( 'Test exception', $ex->getMessage() );
}
$this->database->commit( __METHOD__ );
- // phpcs:ignore Generic.Files.LineLength
$this->assertLastSql( 'BEGIN; SAVEPOINT wikimedia_rdbms_atomic1; ROLLBACK TO SAVEPOINT wikimedia_rdbms_atomic1; COMMIT' );
$this->database->begin( __METHOD__ );
@@ -2033,7 +2027,6 @@ class DatabaseSQLTest extends PHPUnit\Framework\TestCase {
$this->assertNull( $callback2Called );
$this->assertEquals( IDatabase::TRIGGER_ROLLBACK, $callback3Called );
$this->assertSame( 1, $callback4Called );
- // phpcs:ignore Generic.Files.LineLength
$this->assertLastSql( 'BEGIN; SAVEPOINT wikimedia_rdbms_atomic1; ROLLBACK TO SAVEPOINT wikimedia_rdbms_atomic1; SELECT 4; COMMIT; SELECT 3' );
$callback1Called = null;
@@ -2054,7 +2047,6 @@ class DatabaseSQLTest extends PHPUnit\Framework\TestCase {
$this->assertNull( $callback2Called );
$this->assertEquals( IDatabase::TRIGGER_ROLLBACK, $callback3Called );
$this->assertSame( 1, $callback4Called );
- // phpcs:ignore Generic.Files.LineLength
$this->assertLastSql( 'BEGIN; SAVEPOINT wikimedia_rdbms_atomic1; SAVEPOINT wikimedia_rdbms_atomic2; RELEASE SAVEPOINT wikimedia_rdbms_atomic2; ROLLBACK TO SAVEPOINT wikimedia_rdbms_atomic1; SELECT 4; COMMIT; SELECT 3' );
$callback1Called = null;
@@ -2113,7 +2105,6 @@ class DatabaseSQLTest extends PHPUnit\Framework\TestCase {
$this->database->cancelAtomic( __METHOD__ . '_inner' );
$this->database->cancelAtomic( __METHOD__ );
$this->database->endAtomic( __METHOD__ . '_outer' );
- // phpcs:ignore Generic.Files.LineLength
$this->assertLastSql( 'BEGIN; SAVEPOINT wikimedia_rdbms_atomic1; SAVEPOINT wikimedia_rdbms_atomic2; ROLLBACK TO SAVEPOINT wikimedia_rdbms_atomic2; SELECT 4; ROLLBACK TO SAVEPOINT wikimedia_rdbms_atomic1; SELECT 5; COMMIT' );
$this->assertSame( 1, $callback4Called );
$this->assertSame( 1, $callback5Called );
@@ -2128,7 +2119,6 @@ class DatabaseSQLTest extends PHPUnit\Framework\TestCase {
$this->database->endAtomic( __METHOD__ . '_inner' );
$this->database->cancelAtomic( __METHOD__ );
$this->database->endAtomic( __METHOD__ . '_outer' );
- // phpcs:ignore Generic.Files.LineLength
$this->assertLastSql( 'BEGIN; SAVEPOINT wikimedia_rdbms_atomic1; SAVEPOINT wikimedia_rdbms_atomic2; RELEASE SAVEPOINT wikimedia_rdbms_atomic2; ROLLBACK TO SAVEPOINT wikimedia_rdbms_atomic1; SELECT 5; SELECT 4; COMMIT' );
$this->assertSame( 1, $callback4Called );
$this->assertSame( 1, $callback5Called );
@@ -2142,7 +2132,6 @@ class DatabaseSQLTest extends PHPUnit\Framework\TestCase {
$this->database->onAtomicSectionCancel( $callback4, __METHOD__ );
$this->database->cancelAtomic( __METHOD__, $sectionId );
$this->database->endAtomic( __METHOD__ . '_outer' );
- // phpcs:ignore Generic.Files.LineLength
$this->assertLastSql( 'BEGIN; SAVEPOINT wikimedia_rdbms_atomic1; SAVEPOINT wikimedia_rdbms_atomic2; ROLLBACK TO SAVEPOINT wikimedia_rdbms_atomic1; SELECT 5; SELECT 4; COMMIT' );
$this->assertSame( 1, $callback4Called );
$this->assertSame( 1, $callback5Called );
@@ -2184,7 +2173,6 @@ class DatabaseSQLTest extends PHPUnit\Framework\TestCase {
$this->database->query( 'SELECT 1', __METHOD__ );
$this->database->endAtomic( __METHOD__ );
$this->database->commit( __METHOD__, IDatabase::FLUSHING_ALL_PEERS );
- // phpcs:ignore Generic.Files.LineLength
$this->assertLastSql( 'BEGIN; SAVEPOINT wikimedia_rdbms_atomic1; SELECT 1; RELEASE SAVEPOINT wikimedia_rdbms_atomic1; COMMIT' );
}
@@ -2308,7 +2296,6 @@ class DatabaseSQLTest extends PHPUnit\Framework\TestCase {
$this->database->delete( 'y', [ 'field' => 1 ], __METHOD__ );
$this->database->endAtomic( __METHOD__ );
$this->database->commit( __METHOD__ );
- // phpcs:ignore Generic.Files.LineLength
$this->assertLastSql( 'BEGIN; SAVEPOINT wikimedia_rdbms_atomic1; UPDATE y SET a = 1 WHERE field = 1; ROLLBACK TO SAVEPOINT wikimedia_rdbms_atomic1; DELETE FROM y WHERE field = 1; COMMIT' );
$this->assertSame( 0, $this->database->trxLevel(), 'Use after rollback()' );
diff --git a/tests/phpunit/unit/includes/libs/rdbms/querybuilder/SelectQueryBuilderTest.php b/tests/phpunit/unit/includes/libs/rdbms/querybuilder/SelectQueryBuilderTest.php
index d834cebe6ba5..0125029e2dc6 100644
--- a/tests/phpunit/unit/includes/libs/rdbms/querybuilder/SelectQueryBuilderTest.php
+++ b/tests/phpunit/unit/includes/libs/rdbms/querybuilder/SelectQueryBuilderTest.php
@@ -502,7 +502,6 @@ class SelectQueryBuilderTest extends PHPUnit\Framework\TestCase {
public function testFetchRowCountWithField() {
$this->sqb->table( 't' )->field( 'f' )->caller( __METHOD__ );
$this->sqb->fetchRowCount();
- // phpcs:ignore Generic.Files.LineLength.TooLong
$this->assertEquals( 'SELECT COUNT(*) AS rowcount FROM (SELECT 1 FROM t WHERE (f IS NOT NULL) ) tmp_count',
$this->db->getLastSqls() );
}
@@ -525,7 +524,6 @@ class SelectQueryBuilderTest extends PHPUnit\Framework\TestCase {
$this->db->begin( __METHOD__ );
$this->sqb->lockForUpdate();
$this->db->rollback( __METHOD__ );
- // phpcs:ignore Generic.Files.LineLength.TooLong
$this->assertEquals( 'BEGIN; SELECT COUNT(*) AS rowcount FROM (SELECT 1 FROM t WHERE a = \'b\' FOR UPDATE) tmp_count; ROLLBACK',
$this->db->getLastSqls() );
}
diff --git a/tests/phpunit/unit/includes/password/Argon2PasswordTest.php b/tests/phpunit/unit/includes/password/Argon2PasswordTest.php
index 9fd507a78366..90d7bcf943f4 100644
--- a/tests/phpunit/unit/includes/password/Argon2PasswordTest.php
+++ b/tests/phpunit/unit/includes/password/Argon2PasswordTest.php
@@ -5,8 +5,6 @@
* @covers Argon2Password
* @covers Password
* @covers ParameterizedPassword
- *
- * @phpcs:disable Generic.Files.LineLength
*/
class Argon2PasswordTest extends PasswordTestCase {
diff --git a/tests/phpunit/unit/includes/password/BcryptPasswordTest.php b/tests/phpunit/unit/includes/password/BcryptPasswordTest.php
index ad9116b41c50..b234b414e246 100644
--- a/tests/phpunit/unit/includes/password/BcryptPasswordTest.php
+++ b/tests/phpunit/unit/includes/password/BcryptPasswordTest.php
@@ -16,7 +16,6 @@ class BcryptPasswordTest extends PasswordTestCase {
}
public static function providePasswordTests() {
- // phpcs:disable Generic.Files.LineLength
return [
// Tests from glibc bcrypt implementation
[ true, ':bcrypt:5$CCCCCCCCCCCCCCCCCCCCC.$E5YPO9kmyuRGyh0XouQYb4YMJKvyOeW', "U*U" ],
diff --git a/tests/phpunit/unit/includes/password/EncryptedPasswordTest.php b/tests/phpunit/unit/includes/password/EncryptedPasswordTest.php
index a68753db6d31..b2ae909149a2 100644
--- a/tests/phpunit/unit/includes/password/EncryptedPasswordTest.php
+++ b/tests/phpunit/unit/includes/password/EncryptedPasswordTest.php
@@ -43,7 +43,6 @@ class EncryptedPasswordTest extends PasswordTestCase {
}
public static function providePasswordTests() {
- // phpcs:disable Generic.Files.LineLength
return [
// Encrypted with secret1
[ true, ':both:aes-256-cbc:0:izBpxujqC1YbzpCB3qAzgg==:ZqHnitT1pL4YJqKqFES2KEevZYSy2LtlibW5+IMi4XKOGKGy6sE638BXyBbLQQsBtTSrt+JyzwOayKtwIfRbaQsBridx/O1JwBSai1TkGkOsYMBXnlu2Bu/EquCBj5QpjYh7p3Uq4rpiop1KQlin1BJMwnAa1PovhxjpxnYhlhkM4X5ALoGi3XM0bapN48vt', 'password' ],
@@ -61,7 +60,6 @@ class EncryptedPasswordTest extends PasswordTestCase {
* Wrong encryption key selected
*/
public function testDecryptionError() {
- // phpcs:ignore Generic.Files.LineLength
$hash = ':secret1:aes-256-cbc:0:m1LCnQVIakfYBNlr9KEgQg==:5yPTctqrzsybdgaMEag18AZYbnL37pAtXVBqmWxkjXbnNmiDH+1bHoL8lsEVTH/sJntC82kNVgE7zeiD8xUVLYF2VUnvB5+sU+aysE45/zwsCu7a22TaischMAOWrsHZ/tIgS/TnZY2d+HNyxgsEeeYf/QoL+FhmqHquK02+4SRbA5lLuj9niYy1r5CoM9cQ';
$password = $this->passwordFactory->newFromCiphertext( $hash );
$this->expectException( PasswordError::class );
@@ -69,7 +67,6 @@ class EncryptedPasswordTest extends PasswordTestCase {
}
public function testUpdate() {
- // phpcs:ignore Generic.Files.LineLength
$hash = ':both:aes-256-cbc:0:izBpxujqC1YbzpCB3qAzgg==:ZqHnitT1pL4YJqKqFES2KEevZYSy2LtlibW5+IMi4XKOGKGy6sE638BXyBbLQQsBtTSrt+JyzwOayKtwIfRbaQsBridx/O1JwBSai1TkGkOsYMBXnlu2Bu/EquCBj5QpjYh7p3Uq4rpiop1KQlin1BJMwnAa1PovhxjpxnYhlhkM4X5ALoGi3XM0bapN48vt';
$fromHash = $this->passwordFactory->newFromCiphertext( $hash );
$this->assertTrue( $fromHash->update() );
diff --git a/tests/phpunit/unit/includes/password/LayeredParameterizedPasswordTest.php b/tests/phpunit/unit/includes/password/LayeredParameterizedPasswordTest.php
index 0f848ab1ee02..2865acadd863 100644
--- a/tests/phpunit/unit/includes/password/LayeredParameterizedPasswordTest.php
+++ b/tests/phpunit/unit/includes/password/LayeredParameterizedPasswordTest.php
@@ -35,7 +35,6 @@ class LayeredParameterizedPasswordTest extends PasswordTestCase {
}
public static function providePasswordTests() {
- // phpcs:disable Generic.Files.LineLength
return [
[
true,
diff --git a/tests/phpunit/unit/includes/registration/VersionCheckerTest.php b/tests/phpunit/unit/includes/registration/VersionCheckerTest.php
index 5930d1dfaadb..e19fee4f39c3 100644
--- a/tests/phpunit/unit/includes/registration/VersionCheckerTest.php
+++ b/tests/phpunit/unit/includes/registration/VersionCheckerTest.php
@@ -177,7 +177,6 @@ class VersionCheckerTest extends MediaWikiUnitTestCase {
[
'incompatible' => 'FakeExtension',
'type' => 'incompatible-extensions',
- // phpcs:ignore Generic.Files.LineLength.TooLong
'msg' => 'FakeExtension is not compatible with the current installed version of FakeDependency (1.0.0), it requires: 2.0.0.',
],
],
@@ -214,7 +213,6 @@ class VersionCheckerTest extends MediaWikiUnitTestCase {
[
'missing' => 'phpMissingExtension',
'type' => 'missing-phpExtension',
- // phpcs:ignore Generic.Files.LineLength.TooLong
'msg' => 'FakeExtension requires phpMissingExtension PHP extension to be installed.',
],
],
@@ -275,7 +273,6 @@ class VersionCheckerTest extends MediaWikiUnitTestCase {
[
'missing' => 'missingAbilityWithMessage',
'type' => 'missing-ability',
- // phpcs:ignore Generic.Files.LineLength.TooLong
'msg' => 'FakeExtension requires "missingAbilityWithMessage" ability: Missing.',
],
],
diff --git a/tests/phpunit/unit/includes/resourceloader/VueComponentParserTest.php b/tests/phpunit/unit/includes/resourceloader/VueComponentParserTest.php
index 34cf8b26b379..9f04fa6b2d07 100644
--- a/tests/phpunit/unit/includes/resourceloader/VueComponentParserTest.php
+++ b/tests/phpunit/unit/includes/resourceloader/VueComponentParserTest.php
@@ -18,7 +18,6 @@ class VueComponentParserTest extends PHPUnit\Framework\TestCase {
}
public static function provideTestParse() {
- // phpcs:disable Generic.Files.LineLength
return [
[
'<template><p>{{foo}}</p></template><script>bar</script><style>baz</style>',
diff --git a/tests/phpunit/unit/includes/tidy/RemexDriverTest.php b/tests/phpunit/unit/includes/tidy/RemexDriverTest.php
index 5dc1e571aa5a..da142f2fa087 100644
--- a/tests/phpunit/unit/includes/tidy/RemexDriverTest.php
+++ b/tests/phpunit/unit/includes/tidy/RemexDriverTest.php
@@ -206,7 +206,6 @@ class RemexDriverTest extends MediaWikiUnitTestCase {
'a<small><i><div>d</div></i>e</small>',
'<p>a</p><small><i><div>d</div></i></small><p><small>e</small></p>'
],
- // phpcs:disable Generic.Files.LineLength
[
'Complex pwrap test 6',
'<i>a<div>b</div>c<b>d<div>e</div>f</b>g</i>',
diff --git a/tests/phpunit/unit/includes/user/UserTimeCorrectionTest.php b/tests/phpunit/unit/includes/user/UserTimeCorrectionTest.php
index 1d48fd1f1979..19aca6656408 100644
--- a/tests/phpunit/unit/includes/user/UserTimeCorrectionTest.php
+++ b/tests/phpunit/unit/includes/user/UserTimeCorrectionTest.php
@@ -106,7 +106,6 @@ class UserTimeCorrectionTest extends MediaWikiUnitTestCase {
public function provideDSTVariations() {
// Amsterdam observes DST. Johannesburg does not
return [
- // phpcs:disable Generic.Files.LineLength.TooLong
[ new DateTime( '2020-12-01' ), 'ZoneInfo|60|Europe/Amsterdam', 'ZoneInfo|60|Europe/Amsterdam', true ],
[ new DateTime( '2020-12-01' ), 'ZoneInfo|120|Europe/Amsterdam', 'ZoneInfo|60|Europe/Amsterdam', true ],
[ new DateTime( '2020-12-01' ), 'ZoneInfo|120|Africa/Johannesburg', 'ZoneInfo|120|Africa/Johannesburg', true ],
diff --git a/tests/phpunit/unit/includes/utils/MWCryptHashTest.php b/tests/phpunit/unit/includes/utils/MWCryptHashTest.php
index 3a9f48cbb51a..58c8b16f16f1 100644
--- a/tests/phpunit/unit/includes/utils/MWCryptHashTest.php
+++ b/tests/phpunit/unit/includes/utils/MWCryptHashTest.php
@@ -22,7 +22,6 @@ class MWCryptHashTest extends MediaWikiUnitTestCase {
}
$data = 'foobar';
- // phpcs:ignore Generic.Files.LineLength
$hash = '9923afaec3a86f865bb231a588f453f84e8151a2deb4109aebc6de4284be5bebcff4fab82a7e51d920237340a043736e9d13bab196006dcca0fe65314d68eab9';
$this->assertEquals(
@@ -44,7 +43,6 @@ class MWCryptHashTest extends MediaWikiUnitTestCase {
$data = 'foobar';
$key = 'secret';
- // phpcs:ignore Generic.Files.LineLength
$hash = 'ddc94177b2020e55ce2049199fd9cc6327f416ff6dc621cc34cb43d9bec61d73372b4790c0e24957f565ecaf2d42821e6303619093e99cbe14a3b9250bda5f81';
$this->assertEquals(
diff --git a/tests/qunit/QUnitTestResources.php b/tests/qunit/QUnitTestResources.php
index 70c4511d4ca0..28fee500e4fe 100644
--- a/tests/qunit/QUnitTestResources.php
+++ b/tests/qunit/QUnitTestResources.php
@@ -1,7 +1,5 @@
<?php
// These modules are only registered when $wgEnableJavaScriptTest is true
-// phpcs:disable Generic.Files.LineLength
-
return [
'sinonjs' => [