dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "ApiCSPReport: Support origin/path matching for false positives"
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
languages
/
LanguageClassesTestCase.php
diff --git
a/tests/phpunit/languages/LanguageClassesTestCase.php
b/tests/phpunit/languages/LanguageClassesTestCase.php
index
632e037
..
2216ba4
100644
(file)
--- a/
tests/phpunit/languages/LanguageClassesTestCase.php
+++ b/
tests/phpunit/languages/LanguageClassesTestCase.php
@@
-47,16
+47,16
@@
abstract class LanguageClassesTestCase extends MediaWikiTestCase {
*/
protected function setUp() {
parent::setUp();
*/
protected function setUp() {
parent::setUp();
- $found = preg_match( '/Language(.+)Test/',
get_called_class()
, $m );
+ $found = preg_match( '/Language(.+)Test/',
static::class
, $m );
if ( $found ) {
# Normalize language code since classes uses underscores
if ( $found ) {
# Normalize language code since classes uses underscores
- $m[1] = str
_replace( '_', '-', $m[1]
);
+ $m[1] = str
tolower( str_replace( '_', '-', $m[1] )
);
} else {
# Fallback to english language
$m[1] = 'en';
wfDebug(
} else {
# Fallback to english language
$m[1] = 'en';
wfDebug(
- __METHOD__ .
" could not extract a language name "
- .
"out of " . get_called_class()
. " failling back to 'en'\n"
+ __METHOD__ .
' could not extract a language name '
+ .
'out of ' . static::class
. " failling back to 'en'\n"
);
}
// @todo validate $m[1] which should be a valid language code
);
}
// @todo validate $m[1] which should be a valid language code