Gentics Portal.Node PHP API
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
All
Classes
Namespaces
Functions
Variables
Pages
tests
unit
user
LocaleHelperTest.php
1
<?php
2
/**
3
* Gentics Portal.Node PHP
4
* Author & Copyright (c) by Gentics Software GmbH
5
* sales@gentics.com
6
* http://www.gentics.com
7
* Licenses can be found in the LICENSE.txt file in the root-folder of this installation
8
* You must not use this software without a valid license agreement.
9
*
10
*/
11
class
LocaleHelperTest
extends
CTestCase
12
{
13
14
public
function
testYiiFormatToJq()
15
{
16
17
$this->assertEquals(
false
,
LocaleHelper::yiiFormatToJq
(
''
));
18
$this->assertEquals(
'd M yy'
,
LocaleHelper::yiiFormatToJq
(
'd MMM y'
));
19
$this->assertEquals(
'd MM، yy'
,
LocaleHelper::yiiFormatToJq
(
'd MMMM، y'
));
20
$this->assertEquals(
'dd/mm/yy'
,
LocaleHelper::yiiFormatToJq
(
'dd/MM/yyyy'
));
21
$this->assertEquals(
'd/m/yy'
,
LocaleHelper::yiiFormatToJq
(
'd/M/yyyy'
));
22
$this->assertEquals(
'd.m.yy'
,
LocaleHelper::yiiFormatToJq
(
'd.M.yyyy'
));
23
}
24
25
public
function
testYiiLocaleToJq()
26
{
27
$this->assertEquals(
false
,
LocaleHelper::yiiLocaleToJq
(
''
));
28
$this->assertEquals(
'az'
,
LocaleHelper::yiiLocaleToJq
(
'az'
));
29
$this->assertEquals(
'ua'
,
LocaleHelper::yiiLocaleToJq
(
'ua'
));
30
$this->assertEquals(
'sr'
,
LocaleHelper::yiiLocaleToJq
(
'sr_cyrl_ba'
));
31
$this->assertEquals(
'sr-SR'
,
LocaleHelper::yiiLocaleToJq
(
'sr_latn_ba'
));
32
$this->assertEquals(
'de-CH'
,
LocaleHelper::yiiLocaleToJq
(
'de_ch'
));
33
}
34
35
}
Generated on Thu Jun 20 2013 14:45:15 for Gentics Portal.Node PHP API by
1.8.1.2