$this->assertEquals( $expected, $this->getLang()->formatTimePeriod( $seconds, $format ), $desc );
}
- function provideFormattableTimes() {
+ public static function provideFormattableTimes() {
return array(
array(
9.45,
/**
* Array format is ($len, $ellipsis, $input, $expected)
*/
- function provideHTMLTruncateData() {
+ public static function provideHTMLTruncateData() {
return array(
array( 0, 'XXX', "1234567890", "XXX" ),
array( 8, 'XXX', "1234567890", "12345XXX" ),
* and distributed as free software, under the GNU General Public Licence.
* http://www.bortzmeyer.org/gabuzomeu-parsing-language-tags.html
*/
- function provideWellFormedLanguageTags() {
+ public static function provideWellFormedLanguageTags() {
return array(
array( 'fr', 'two-letter code' ),
array( 'fr-latn', 'two-letter code with lower case script code' ),
* and distributed as free software, under the GNU General Public Licence.
* http://www.bortzmeyer.org/gabuzomeu-parsing-language-tags.html
*/
- function provideMalformedLanguageTags() {
+ public static function provideMalformedLanguageTags() {
return array(
array( 'f', 'language too short' ),
array( 'f-Latn', 'language too short with script' ),
);
}
- function provideLanguageCodes() {
+ public static function provideLanguageCodes() {
return array(
array( 'fr', 'Two letters, minor case' ),
array( 'EN', 'Two letters, upper case' ),
);
}
- function provideKnownLanguageTags() {
+ public static function provideKnownLanguageTags() {
return array(
array( 'fr', 'simple code' ),
array( 'bat-smg', 'an MW legacy tag' ),
);
}
- function provideUnknownLanguageTags() {
+ public static function provideUnknownLanguageTags() {
return array(
array( 'mw', 'non-existent two-letter code' ),
);
date_default_timezone_set( $oldTZ );
}
- function provideSprintfDateSamples() {
+ public static function provideSprintfDateSamples() {
return array(
array(
'xiY',
);
}
- function provideFormatSizes() {
+ public static function provideFormatSizes() {
return array(
array(
0,
);
}
- function provideFormatBitrate() {
+ public static function provideFormatBitrate() {
return array(
array(
0,
- "0bps",
+ "0 bps",
"0 bits per second"
),
array(
999,
- "999bps",
+ "999 bps",
"999 bits per second"
),
array(
1000,
- "1kbps",
+ "1 kbps",
"1 kilobit per second"
),
array(
1000 * 1000,
- "1Mbps",
+ "1 Mbps",
"1 megabit per second"
),
array(
pow( 10, 9 ),
- "1Gbps",
+ "1 Gbps",
"1 gigabit per second"
),
array(
pow( 10, 12 ),
- "1Tbps",
+ "1 Tbps",
"1 terabit per second"
),
array(
pow( 10, 15 ),
- "1Pbps",
+ "1 Pbps",
"1 petabit per second"
),
array(
pow( 10, 18 ),
- "1Ebps",
+ "1 Ebps",
"1 exabit per second"
),
array(
pow( 10, 21 ),
- "1Zbps",
+ "1 Zbps",
"1 zetabit per second"
),
array(
pow( 10, 24 ),
- "1Ybps",
+ "1 Ybps",
"1 yottabit per second"
),
array(
pow( 10, 27 ),
- "1,000Ybps",
+ "1,000 Ybps",
"1,000 yottabits per second"
),
);
);
}
- function provideFormatDuration() {
+ public static function provideFormatDuration() {
return array(
array(
0,
);
}
- function provideCheckTitleEncodingData() {
+ public static function provideCheckTitleEncodingData() {
return array(
array( "" ),
array( "United States of America" ), // 7bit ASCII
);
}
- function provideRomanNumeralsData() {
+ public static function provideRomanNumeralsData() {
return array(
array( 1, 'I' ),
array( 2, 'II' ),
$this->assertEquals( $expected, $chosen );
}
- function providePluralData() {
+ public static function providePluralData() {
// Params are: [expected text, number given, [the plural forms]]
return array(
array( 'plural', 0, array(
$this->assertEquals( $expected, $lang->translateBlockExpiry( $str ), $desc );
}
- function provideTranslateBlockExpiry() {
+ public static function provideTranslateBlockExpiry() {
return array(
array( '2 hours', '2 hours', 'simple data from ipboptions' ),
array( 'indefinite', 'infinite', 'infinite from ipboptions' ),
);
}
- function provideCommafyData() {
+ public static function provideCommafyData() {
return array(
array( 1, '1' ),
array( 10, '10' ),
$this->assertEquals( $expected, Language::isSupportedLanguage( $code ), $comment );
}
- static function provideIsSupportedLanguage() {
+ public static function provideIsSupportedLanguage() {
return array(
array( 'en', true, 'is supported language' ),
array( 'fi', true, 'is supported language' ),