8e30259b17a8a46ec5b248ffe3f5ac339306b84e
2 require_once dirname(dirname(__FILE__
)). '/bootstrap.php';
4 class LanguageTest
extends MediaWikiTestSetup
{
8 $this->lang
= Language
::factory( 'en' );
14 function testLanguageConvertDoubleWidthToSingleWidth() {
16 "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
17 $this->lang
->normalizeForSearch(
18 "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
20 'convertDoubleWidth() with the full alphabet and digits'
24 function testFormatTimePeriod() {
27 $this->lang
->formatTimePeriod( 9.45 ),
28 'formatTimePeriod() rounding (<10s)'
33 $this->lang
->formatTimePeriod( 9.95 ),
34 'formatTimePeriod() rounding (<10s)'
39 $this->lang
->formatTimePeriod( 59.55 ),
40 'formatTimePeriod() rounding (<60s)'
45 $this->lang
->formatTimePeriod( 119.55 ),
46 'formatTimePeriod() rounding (<1h)'
51 $this->lang
->formatTimePeriod( 3599.55 ),
52 'formatTimePeriod() rounding (<1h)'
57 $this->lang
->formatTimePeriod( 7199.55 ),
58 'formatTimePeriod() rounding (>=1h)'