summaryrefslogtreecommitdiff
path: root/tests/unit/I18N/core/CultureInfoTest.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2014-01-15 19:05:25 +0100
committerFabio Bas <ctrlaltca@gmail.com>2014-01-15 19:05:25 +0100
commit2fdb1e997f030155bd6648f9d72a77ccecda0324 (patch)
treede5d34a1c45bb99fa973e7577969a26cb65155ad /tests/unit/I18N/core/CultureInfoTest.php
parentfa51a0a2e3ce4ec4a82a5d2f53fbd50cfcb16528 (diff)
Removed ?> from tests
Diffstat (limited to 'tests/unit/I18N/core/CultureInfoTest.php')
-rw-r--r--tests/unit/I18N/core/CultureInfoTest.php22
1 files changed, 10 insertions, 12 deletions
diff --git a/tests/unit/I18N/core/CultureInfoTest.php b/tests/unit/I18N/core/CultureInfoTest.php
index 6c1eda06..58c8f235 100644
--- a/tests/unit/I18N/core/CultureInfoTest.php
+++ b/tests/unit/I18N/core/CultureInfoTest.php
@@ -8,16 +8,16 @@ Prado::using('System.I18N.core.CultureInfo');
*/
class CultureInfoTest extends PHPUnit_Framework_TestCase {
protected $culture;
-
+
function setUp() {
$this->culture = CultureInfo::getInvariantCulture();
}
-
+
function testCultureName() {
$name = 'en';
-
+
$this->assertEquals($name, $this->culture->Name);
-
+
//the default/invariant culture should be neutral
$this->assertTrue($this->culture->IsNeutralCulture);
}
@@ -26,18 +26,18 @@ class CultureInfoTest extends PHPUnit_Framework_TestCase {
$allCultures = CultureInfo::getCultures();
$neutralCultures = CultureInfo::getCultures(CultureInfo::NEUTRAL);
$specificCultures = CultureInfo::getCultures(CultureInfo::SPECIFIC);
-
+
//there should be 246 cultures all together.
$this->assertEquals(count($allCultures),246);
$this->assertEquals(count($neutralCultures),76);
- $this->assertEquals(count($specificCultures),170);
+ $this->assertEquals(count($specificCultures),170);
}
function testParentCultures() {
$zh_CN = new CultureInfo('zh_CN');
$parent = $zh_CN->Parent;
$grandparent = $parent->Parent;
-
+
$this->assertEquals($zh_CN->Name, 'zh_CN');
$this->assertEquals($parent->Name, 'zh');
$this->assertEquals($grandparent->Name, 'en');
@@ -54,17 +54,17 @@ class CultureInfoTest extends PHPUnit_Framework_TestCase {
$au = array('$', 'Australian Dollar');
$this->assertEquals($au, $culture->Currencies['AUD']);
}
-
+
function testLanguages() {
$culture = new CultureInfo('fr_BE');
$this->assertEquals($culture->Languages['fr'], 'français');
}
-
+
function testScripts() {
$culture = new CultureInfo('fr');
$this->assertEquals($culture->Scripts['Armn'], 'arménien');
}
-
+
function testTimeZones() {
$culture = new CultureInfo('fi');
$zone = array(
@@ -83,5 +83,3 @@ class CultureInfoTest extends PHPUnit_Framework_TestCase {
$this->assertEquals($culture->getEnglishName(), 'iw');
}
}
-
-?> \ No newline at end of file