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,38 +25,46 @@ final class ValidFunctionNameUnitTest extends AbstractSniffUnitTest {
|
||||||
/**
|
/**
|
||||||
* Returns the lines where errors should occur.
|
* 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.
|
* @return array<int, int> Key is the line number, value is the number of expected errors.
|
||||||
*/
|
*/
|
||||||
public function getErrorList() {
|
public function getErrorList( $testFile = '' ) {
|
||||||
return array(
|
switch ( $testFile ) {
|
||||||
3 => 1,
|
case 'ValidFunctionNameUnitTest.1.inc':
|
||||||
9 => 1,
|
return array(
|
||||||
13 => 1,
|
3 => 1,
|
||||||
15 => 1,
|
9 => 1,
|
||||||
79 => 2,
|
13 => 1,
|
||||||
80 => 2,
|
15 => 1,
|
||||||
81 => 2,
|
79 => 2,
|
||||||
82 => 2,
|
80 => 2,
|
||||||
83 => 2,
|
81 => 2,
|
||||||
84 => 2,
|
82 => 2,
|
||||||
85 => 2,
|
83 => 2,
|
||||||
86 => 2,
|
84 => 2,
|
||||||
87 => 2,
|
85 => 2,
|
||||||
88 => 2,
|
86 => 2,
|
||||||
89 => 2,
|
87 => 2,
|
||||||
106 => 2,
|
88 => 2,
|
||||||
116 => 1,
|
89 => 2,
|
||||||
117 => 1,
|
106 => 2,
|
||||||
157 => 2,
|
116 => 1,
|
||||||
183 => 1,
|
117 => 1,
|
||||||
184 => 1,
|
157 => 2,
|
||||||
185 => 1,
|
183 => 1,
|
||||||
199 => 1,
|
184 => 1,
|
||||||
208 => 2,
|
185 => 1,
|
||||||
210 => 1,
|
199 => 1,
|
||||||
223 => function_exists( 'mb_strtolower' ) ? 1 : 0,
|
208 => 2,
|
||||||
224 => 1,
|
210 => 1,
|
||||||
);
|
223 => function_exists( 'mb_strtolower' ) ? 1 : 0,
|
||||||
|
224 => 1,
|
||||||
|
);
|
||||||
|
|
||||||
|
default:
|
||||||
|
return array();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue