comparison vendor/nikic/php-parser/test/updateTests.php @ 4:a9cd425dd02b

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:11:55 +0000
parents c75dbcec494b
children
comparison
equal deleted inserted replaced
3:307d7a7fd348 4:a9cd425dd02b
19 list($name, $tests) = $testParser->parseTest($code, 2); 19 list($name, $tests) = $testParser->parseTest($code, 2);
20 $newTests = []; 20 $newTests = [];
21 foreach ($tests as list($modeLine, list($input, $expected))) { 21 foreach ($tests as list($modeLine, list($input, $expected))) {
22 $modes = null !== $modeLine ? array_fill_keys(explode(',', $modeLine), true) : []; 22 $modes = null !== $modeLine ? array_fill_keys(explode(',', $modeLine), true) : [];
23 list($parser5, $parser7) = $codeParsingTest->createParsers($modes); 23 list($parser5, $parser7) = $codeParsingTest->createParsers($modes);
24 $output = isset($modes['php5']) 24 list(, $output) = isset($modes['php5'])
25 ? $codeParsingTest->getParseOutput($parser5, $input, $modes) 25 ? $codeParsingTest->getParseOutput($parser5, $input, $modes)
26 : $codeParsingTest->getParseOutput($parser7, $input, $modes); 26 : $codeParsingTest->getParseOutput($parser7, $input, $modes);
27 $newTests[] = [$modeLine, [$input, $output]]; 27 $newTests[] = [$modeLine, [$input, $output]];
28 } 28 }
29 29