aboutsummaryrefslogtreecommitdiffstats
path: root/tests/parser
diff options
context:
space:
mode:
authorC. Scott Ananian <cscott@cscott.net>2020-07-24 00:07:56 -0400
committerC. Scott Ananian <cscott@cscott.net>2020-07-24 00:29:12 -0400
commit7101c981b294b74bc72eb49eaaa9942bdf89f637 (patch)
treec6ba89336eb048b928aefab17e1aadce78aaf81f /tests/parser
parent769340fe3e35096e3a5de33b232809c13a2c7a86 (diff)
downloadmediawikicore-7101c981b294b74bc72eb49eaaa9942bdf89f637.tar.gz
mediawikicore-7101c981b294b74bc72eb49eaaa9942bdf89f637.zip
Fix parser test class naming
This isn't really user visible, but the algorithm for ensuring there are no conflicts in automatically-generated parser test class names had a number of issues which led to inconsistent naming. Change-Id: I50ff5b72381332c77f0d99af08e689796019a7af
Diffstat (limited to 'tests/parser')
-rw-r--r--tests/parser/ParserTestRunner.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/parser/ParserTestRunner.php b/tests/parser/ParserTestRunner.php
index 3f45c7cddc46..9df7b8b24855 100644
--- a/tests/parser/ParserTestRunner.php
+++ b/tests/parser/ParserTestRunner.php
@@ -202,9 +202,10 @@ class ParserTestRunner {
foreach ( $dirIterator as $fileInfo ) {
/** @var SplFileInfo $fileInfo */
if ( substr( $fileInfo->getFilename(), -4 ) === '.txt' ) {
- $name = $info['name'] . $counter;
+ $name = $info['name'] . '_' . $counter;
while ( isset( $files[$name] ) ) {
- $name = $info['name'] . '_' . $counter++;
+ $counter++;
+ $name = $info['name'] . '_' . $counter;
}
$files[$name] = $fileInfo->getPathname();
}