diff --git a/src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.inc b/src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.1.inc similarity index 100% rename from src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.inc rename to src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.1.inc diff --git a/src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.php b/src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.php index fda8d461c7..c26ca45692 100644 --- a/src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.php +++ b/src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.php @@ -26,11 +26,18 @@ final class NestingLevelUnitTest extends AbstractSniffUnitTest * The key of the array should represent the line number and the value * should represent the number of errors that should occur on that line. * + * @param string $testFile The name of the test file to process. + * * @return array */ - public function getErrorList() + public function getErrorList($testFile='') { - return [73 => 1]; + switch ($testFile) { + case 'NestingLevelUnitTest.1.inc': + return [73 => 1]; + default: + return []; + } }//end getErrorList() @@ -41,14 +48,21 @@ public function getErrorList() * The key of the array should represent the line number and the value * should represent the number of warnings that should occur on that line. * + * @param string $testFile The name of the test file to process. + * * @return array */ - public function getWarningList() + public function getWarningList($testFile='') { - return [ - 27 => 1, - 46 => 1, - ]; + switch ($testFile) { + case 'NestingLevelUnitTest.1.inc': + return [ + 27 => 1, + 46 => 1, + ]; + default: + return []; + } }//end getWarningList()