mirror of
https://github.com/WordPress/WordPress-Coding-Standards.git
synced 2025-08-30 03:11:24 +08:00
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:
parent
00e9af7fde
commit
0076d49824
2 changed files with 38 additions and 30 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue