diff options
author | Timo Tijhof <krinkle@fastmail.com> | 2022-02-16 17:43:43 +0000 |
---|---|---|
committer | Krinkle <krinkle@fastmail.com> | 2022-02-18 18:32:05 +0000 |
commit | 8d406bbcd69cb50b110bd3fb0d0c9878e3b0b3be (patch) | |
tree | 562870515abca9923702fbd4ff394a69d0c19667 /tests/phpunit/includes/ContentSecurityPolicyTest.php | |
parent | 38467129b8c14acded3c3a5528c51e8f4641f25f (diff) | |
download | mediawikicore-8d406bbcd69cb50b110bd3fb0d0c9878e3b0b3be.tar.gz mediawikicore-8d406bbcd69cb50b110bd3fb0d0c9878e3b0b3be.zip |
phpcs: Disable `Generic.Files.LineLength` for test files
There is a common and reasonable need for longer lines in tests.
The nudge for shorter lines doesn't seem valuable here. The natural
breaks will likely still fall in 80-100 given the enforced practice
for non-test code, e.g. whether through habit, or 80-100 column markers
in text editors, or the finite width of diff and code review
interfaces.
Change-Id: I879479e13551789a67624ce66f0946d2f185e6ee
Diffstat (limited to 'tests/phpunit/includes/ContentSecurityPolicyTest.php')
-rw-r--r-- | tests/phpunit/includes/ContentSecurityPolicyTest.php | 4 |
1 files changed, 0 insertions, 4 deletions
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 ); } |