Use double-underscore instead of non-ASCII character for class name separator
authorTim Starling <tstarling@wikimedia.org>
Mon, 7 Sep 2015 05:30:13 +0000 (15:30 +1000)
committerTim Starling <tstarling@wikimedia.org>
Mon, 7 Sep 2015 05:45:26 +0000 (15:45 +1000)
MediaWikiParserTest.php generates fake test classes with eval(). It uses
synthetic class names with U+2044 "fraction slash" as a separator, but
this turns out to be an unfortunate choice since in certain terminal
modes, it causes readline to return to the start of the line as if the
"home" key was pressed, without adding a character. This makes it
difficult to paste class names.

Change-Id: I1c66b9caf256b8d0535fb7ed6e52ed842e193f46

tests/phpunit/includes/parser/MediaWikiParserTest.php

index df891f5..96ae3be 100644 (file)
@@ -91,7 +91,7 @@ class MediaWikiParserTest {
                        // enough to cause there to be separate names for different
                        // things, which is good enough for our purposes.
                        $extensionName = basename( dirname( $fileName ) );
-                       $testsName = $extensionName . '' . basename( $fileName, '.txt' );
+                       $testsName = $extensionName . '__' . basename( $fileName, '.txt' );
                        $escapedFileName = strtr( $fileName, array( "'" => "\\'", '\\' => '\\\\' ) );
                        $parserTestClassName = ucfirst( $testsName );
                        // Official spec for class names: http://php.net/manual/en/language.oop5.basic.php