From: Tim Starling Date: Mon, 7 Sep 2015 05:30:13 +0000 (+1000) Subject: Use double-underscore instead of non-ASCII character for class name separator X-Git-Tag: 1.31.0-rc.0~10125^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=f5e6b581787a01c75e4b5686d46fa7d43a83faef;p=lhc%2Fweb%2Fwiklou.git Use double-underscore instead of non-ASCII character for class name separator 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 --- diff --git a/tests/phpunit/includes/parser/MediaWikiParserTest.php b/tests/phpunit/includes/parser/MediaWikiParserTest.php index df891f5a4b..96ae3bec64 100644 --- a/tests/phpunit/includes/parser/MediaWikiParserTest.php +++ b/tests/phpunit/includes/parser/MediaWikiParserTest.php @@ -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