From a50b5fbaefe6740d49056aa018fa17f70f461c03 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Fri, 29 Mar 2024 02:41:54 +0100 Subject: [PATCH] PEAR/Functions/FunctionDeclaration: rename test case file ... in anticipation of adding additional test case files. --- ...Test.inc => FunctionDeclarationUnitTest.1.inc} | 0 ...ed => FunctionDeclarationUnitTest.1.inc.fixed} | 0 .../Functions/FunctionDeclarationUnitTest.php | 15 +++++++++------ 3 files changed, 9 insertions(+), 6 deletions(-) rename src/Standards/PEAR/Tests/Functions/{FunctionDeclarationUnitTest.inc => FunctionDeclarationUnitTest.1.inc} (100%) rename src/Standards/PEAR/Tests/Functions/{FunctionDeclarationUnitTest.inc.fixed => FunctionDeclarationUnitTest.1.inc.fixed} (100%) diff --git a/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.inc b/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.1.inc similarity index 100% rename from src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.inc rename to src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.1.inc diff --git a/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.inc.fixed b/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.1.inc.fixed similarity index 100% rename from src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.inc.fixed rename to src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.1.inc.fixed diff --git a/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.php b/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.php index 04f846bc70..c81e7d4e99 100644 --- a/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.php +++ b/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.php @@ -32,8 +32,9 @@ final class FunctionDeclarationUnitTest extends AbstractSniffUnitTest */ public function getErrorList($testFile='') { - if ($testFile === 'FunctionDeclarationUnitTest.inc') { - $errors = [ + switch ($testFile) { + case 'FunctionDeclarationUnitTest.1.inc': + return [ 3 => 1, 4 => 1, 5 => 1, @@ -108,8 +109,9 @@ public function getErrorList($testFile='') 483 => 1, 490 => 2, ]; - } else { - $errors = [ + + case 'FunctionDeclarationUnitTest.js': + return [ 3 => 1, 4 => 1, 5 => 1, @@ -121,9 +123,10 @@ public function getErrorList($testFile='') 41 => 1, 48 => 1, ]; - }//end if - return $errors; + default: + return []; + }//end switch }//end getErrorList()