diff --git a/WordPressVIPMinimum/Tests/Security/ProperEscapingFunctionUnitTest.inc b/WordPressVIPMinimum/Tests/Security/ProperEscapingFunctionUnitTest.1.inc similarity index 100% rename from WordPressVIPMinimum/Tests/Security/ProperEscapingFunctionUnitTest.inc rename to WordPressVIPMinimum/Tests/Security/ProperEscapingFunctionUnitTest.1.inc diff --git a/WordPressVIPMinimum/Tests/Security/ProperEscapingFunctionUnitTest.php b/WordPressVIPMinimum/Tests/Security/ProperEscapingFunctionUnitTest.php index 9a4b31c8..ba0c2679 100644 --- a/WordPressVIPMinimum/Tests/Security/ProperEscapingFunctionUnitTest.php +++ b/WordPressVIPMinimum/Tests/Security/ProperEscapingFunctionUnitTest.php @@ -21,43 +21,51 @@ class ProperEscapingFunctionUnitTest extends AbstractSniffUnitTest { /** * Returns the lines where errors should occur. * + * @param string $testFile The name of the file being tested. + * * @return array => */ - public function getErrorList() { - return [ - 3 => 1, - 5 => 1, - 15 => 1, - 17 => 1, - 21 => 1, - 23 => 1, - 33 => 1, - 37 => 1, - 41 => 1, - 45 => 1, - 48 => 1, - 62 => 1, - 63 => 1, - 64 => 1, - 65 => 1, - 67 => 1, - 68 => 1, - 69 => 1, - 72 => 1, - 73 => 1, - 74 => 1, - 75 => 1, - 76 => 1, - 77 => 1, - 78 => 1, - 79 => 1, - 80 => 1, - 82 => 1, - 92 => 1, - 97 => 1, - 102 => 1, - 104 => 1, - ]; + public function getErrorList( $testFile = '' ) { + switch ( $testFile ) { + case 'ProperEscapingFunctionUnitTest.1.inc': + return [ + 3 => 1, + 5 => 1, + 15 => 1, + 17 => 1, + 21 => 1, + 23 => 1, + 33 => 1, + 37 => 1, + 41 => 1, + 45 => 1, + 48 => 1, + 62 => 1, + 63 => 1, + 64 => 1, + 65 => 1, + 67 => 1, + 68 => 1, + 69 => 1, + 72 => 1, + 73 => 1, + 74 => 1, + 75 => 1, + 76 => 1, + 77 => 1, + 78 => 1, + 79 => 1, + 80 => 1, + 82 => 1, + 92 => 1, + 97 => 1, + 102 => 1, + 104 => 1, + ]; + + default: + return []; + } } /**