Skip to content

Commit d56798e

Browse files
rodrigoprimojrfnl
andcommitted
Apply changes from code review
Co-authored-by: Juliette <[email protected]>
1 parent 322829b commit d56798e

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

WordPress/Tests/Security/EscapeOutputUnitTest.1.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ exit( status: esc_html( $foo ) ); // Ok.
661661
die( status: esc_html( $foo ) ); // Ok.
662662

663663
exit( status: $foo ); // Bad.
664-
\die( status: $foo ); // Bad.
664+
\Die( status: $foo ); // Bad.
665665

666666
/*
667667
* Issue https://github.com/WordPress/WordPress-Coding-Standards/issues/2552

WordPress/Tests/Security/EscapeOutputUnitTest.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
namespace WordPressCS\WordPress\Tests\Security;
1111

1212
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
13-
use PHPCSUtils\BackCompat\Helper;
1413

1514
/**
1615
* Unit test class for the EscapeOutput sniff.
@@ -38,8 +37,6 @@ final class EscapeOutputUnitTest extends AbstractSniffUnitTest {
3837
public function getErrorList( $testFile = '' ) {
3938
switch ( $testFile ) {
4039
case 'EscapeOutputUnitTest.1.inc':
41-
$phpcs_version = Helper::getVersion();
42-
4340
return array(
4441
17 => 1,
4542
19 => 1,
@@ -163,9 +160,7 @@ public function getErrorList( $testFile = '' ) {
163160
655 => 1,
164161
657 => 1,
165162
663 => 1,
166-
// PHPCS 3.13.3 changed the tokenization of FQN exit/die it impacts directly how this test case
167-
// behaves (see https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/1201).
168-
664 => version_compare( $phpcs_version, '3.13.3', '>=' ) ? 1 : 0,
163+
664 => 1,
169164
672 => 1,
170165
673 => 1,
171166
678 => 1,

0 commit comments

Comments
 (0)