2010-12-14 16:26:35 +00:00
|
|
|
|
<?php
|
|
|
|
|
|
|
2010-12-28 17:45:33 +00:00
|
|
|
|
class LanguageBeTaraskTest extends MediaWikiTestCase {
|
2010-12-14 16:26:35 +00:00
|
|
|
|
private $lang;
|
|
|
|
|
|
|
|
|
|
|
|
function setUp() {
|
2011-03-04 17:16:09 +00:00
|
|
|
|
$this->lang = Language::factory( 'Be-tarask' );
|
2010-12-14 16:26:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
function tearDown() {
|
|
|
|
|
|
unset( $this->lang );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** see bug 23156 & r64981 */
|
|
|
|
|
|
function testSearchRightSingleQuotationMarkAsApostroph() {
|
|
|
|
|
|
$this->assertEquals(
|
|
|
|
|
|
"'",
|
|
|
|
|
|
$this->lang->normalizeForSearch( '’' ),
|
|
|
|
|
|
'bug 23156: U+2019 conversion to U+0027'
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
/** see bug 23156 & r64981 */
|
|
|
|
|
|
function testCommafy() {
|
|
|
|
|
|
$this->assertEquals( '1,234,567', $this->lang->commafy( '1234567' ) );
|
|
|
|
|
|
$this->assertEquals( '12,345', $this->lang->commafy( '12345' ) );
|
|
|
|
|
|
}
|
|
|
|
|
|
/** see bug 23156 & r64981 */
|
|
|
|
|
|
function testDoesNotCommafyFourDigitsNumber() {
|
|
|
|
|
|
$this->assertEquals( '1234', $this->lang->commafy( '1234' ) );
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|