Skip to content

Commit

Permalink
Generic/OpeningFunctionBraceKernighanRichie: rename test case file
Browse files Browse the repository at this point in the history
Doing this to be able to create tests with syntax errors on separate
files.
  • Loading branch information
rodrigoprimo committed Nov 21, 2024
1 parent 89a17b6 commit bbfc68b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,40 +26,47 @@ final class OpeningFunctionBraceKernighanRitchieUnitTest extends AbstractSniffUn
* 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<int, int>
*/
public function getErrorList()
public function getErrorList($testFile='')
{
return [
9 => 1,
13 => 1,
17 => 1,
29 => 1,
33 => 1,
37 => 1,
53 => 1,
58 => 1,
63 => 1,
77 => 1,
82 => 1,
87 => 1,
104 => 1,
119 => 1,
123 => 1,
127 => 1,
132 => 1,
137 => 1,
142 => 1,
157 => 1,
162 => 1,
171 => 1,
181 => 1,
191 => 1,
197 => 1,
203 => 1,
213 => 1,
214 => 1,
];
switch ($testFile) {
case 'OpeningFunctionBraceKernighanRitchieUnitTest.1.inc':
return [
9 => 1,
13 => 1,
17 => 1,
29 => 1,
33 => 1,
37 => 1,
53 => 1,
58 => 1,
63 => 1,
77 => 1,
82 => 1,
87 => 1,
104 => 1,
119 => 1,
123 => 1,
127 => 1,
132 => 1,
137 => 1,
142 => 1,
157 => 1,
162 => 1,
171 => 1,
181 => 1,
191 => 1,
197 => 1,
203 => 1,
213 => 1,
214 => 1,
];
default:
return [];
}//end switch

}//end getErrorList()

Expand Down

0 comments on commit bbfc68b

Please sign in to comment.