Skip to content

Commit

Permalink
PEAR/ValidDefaultValue: rename test case file to allow for adding more
Browse files Browse the repository at this point in the history
  • Loading branch information
biinari committed Jul 15, 2024
1 parent 071344b commit 3d6c0cd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions src/Standards/PEAR/Tests/Functions/ValidDefaultValueUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,31 @@ final class ValidDefaultValueUnitTest 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 file being tested.
*
* @return array<int, int>
*/
public function getErrorList()
public function getErrorList($testFile='')
{
return [
29 => 1,
34 => 1,
39 => 1,
71 => 1,
76 => 1,
81 => 1,
91 => 1,
99 => 1,
101 => 1,
106 => 1,
114 => 1,
];
switch ($testFile) {
case 'ValidDefaultValueUnitTest.1.inc':
return [
29 => 1,
34 => 1,
39 => 1,
71 => 1,
76 => 1,
81 => 1,
91 => 1,
99 => 1,
101 => 1,
106 => 1,
114 => 1,
];

default:
return [];
}

}//end getErrorList()

Expand Down

0 comments on commit 3d6c0cd

Please sign in to comment.