NamingConventions/ValidFunctionName: rename test case file

This is necessary to be able to create more test case files with syntax errors in a future commit.
This commit is contained in:
Rodrigo Primo 2025-07-15 17:01:46 -03:00
parent 00e9af7fde
commit 0076d49824
2 changed files with 38 additions and 30 deletions

View file

@ -25,9 +25,13 @@ final class ValidFunctionNameUnitTest extends AbstractSniffUnitTest {
/**
* Returns the lines where errors should occur.
*
* @param string $testFile The name of the file being tested.
*
* @return array<int, int> Key is the line number, value is the number of expected errors.
*/
public function getErrorList() {
public function getErrorList( $testFile = '' ) {
switch ( $testFile ) {
case 'ValidFunctionNameUnitTest.1.inc':
return array(
3 => 1,
9 => 1,
@ -57,6 +61,10 @@ final class ValidFunctionNameUnitTest extends AbstractSniffUnitTest {
223 => function_exists( 'mb_strtolower' ) ? 1 : 0,
224 => 1,
);
default:
return array();
}
}
/**