mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-11-26 20:14:46 +01:00
Fix updateTests.php
This commit is contained in:
parent
2f67429ec9
commit
3e02eb7108
@ -52,7 +52,8 @@ class CodeParsingTest extends CodeTestAbstract
|
||||
];
|
||||
}
|
||||
|
||||
private function getParseOutput(Parser $parser, $code, array $modes) {
|
||||
// Must be public for updateTests.php
|
||||
public function getParseOutput(Parser $parser, $code, array $modes) {
|
||||
$dumpPositions = isset($modes['positions']);
|
||||
|
||||
$errors = new ErrorHandler\Collecting;
|
||||
|
@ -21,7 +21,7 @@ foreach (filesInDir($dir, 'test') as $fileName => $code) {
|
||||
foreach ($tests as list($modeLine, list($input, $expected))) {
|
||||
$modes = null !== $modeLine ? array_fill_keys(explode(',', $modeLine), true) : [];
|
||||
list($parser5, $parser7) = $codeParsingTest->createParsers($modes);
|
||||
$output = isset($modes['php5'])
|
||||
list(, $output) = isset($modes['php5'])
|
||||
? $codeParsingTest->getParseOutput($parser5, $input, $modes)
|
||||
: $codeParsingTest->getParseOutput($parser7, $input, $modes);
|
||||
$newTests[] = [$modeLine, [$input, $output]];
|
||||
|
Loading…
Reference in New Issue
Block a user