summaryrefslogtreecommitdiff
path: root/tests/UnitTests/framework/I18N/testNumberFormatInfo.php
diff options
context:
space:
mode:
authorwei <>2006-07-05 07:45:41 +0000
committerwei <>2006-07-05 07:45:41 +0000
commite7e7c7403b1ffffdf1a7a4bb9e1de752fe1c72db (patch)
tree08ef806c2e72a6d14367797c765d3fb8dfa0a1d6 /tests/UnitTests/framework/I18N/testNumberFormatInfo.php
parentdfa5aa5fbf11f89ce483c58016465ddc3921f082 (diff)
clean up tests
Diffstat (limited to 'tests/UnitTests/framework/I18N/testNumberFormatInfo.php')
-rw-r--r--tests/UnitTests/framework/I18N/testNumberFormatInfo.php105
1 files changed, 0 insertions, 105 deletions
diff --git a/tests/UnitTests/framework/I18N/testNumberFormatInfo.php b/tests/UnitTests/framework/I18N/testNumberFormatInfo.php
deleted file mode 100644
index 0b0a3140..00000000
--- a/tests/UnitTests/framework/I18N/testNumberFormatInfo.php
+++ /dev/null
@@ -1,105 +0,0 @@
-<?php
-
-//NOTE: This page require UTF-8 aware editors
-
-Prado::using('System.I18N.core.NumberFormatInfo');
-
-class testNumberFormatInfo extends UnitTestCase
-{
- function testNumberFormatInfo()
- {
- $this->UnitTestCase();
- }
-
- function testCurrencyPatterns()
- {
- $numberInfo = NumberFormatInfo::getCurrencyInstance();
-
- //there should be 2 decimal places.
- $this->assertEqual($numberInfo->DecimalDigits,2);
-
- $this->assertEqual($numberInfo->DecimalSeparator,'.');
-
- $this->assertEqual($numberInfo->GroupSeparator,',');
-
- //there should be only 1 grouping of size 3
- $groupsize = array(3,false);
- $this->assertEqual($numberInfo->GroupSizes, $groupsize);
-
- //the default negative pattern prefix and postfix
- $negPattern = array('-¤','');
- $this->assertEqual($numberInfo->NegativePattern, $negPattern);
-
- //the default positive pattern prefix and postfix
- $negPattern = array('¤','');
- $this->assertEqual($numberInfo->PositivePattern, $negPattern);
-
- //the default currency symbol
- $this->assertEqual($numberInfo->CurrencySymbol, 'US$');
-
- $this->assertEqual($numberInfo->getCurrencySymbol('JPY'), '¥');
-
- $this->assertEqual($numberInfo->NegativeInfinitySymbol, '-∞');
-
- $this->assertEqual($numberInfo->PositiveInfinitySymbol, '+∞');
-
- $this->assertEqual($numberInfo->NegativeSign, '-');
-
- $this->assertEqual($numberInfo->PositiveSign, '+');
-
- $this->assertEqual($numberInfo->NaNSymbol, '�');
-
- $this->assertEqual($numberInfo->PercentSymbol, '%');
-
- $this->assertEqual($numberInfo->PerMilleSymbol, '‰');
-
- }
-
- function testPatternsSet()
- {
- $numberInfo = NumberFormatInfo::getInstance();
-
- $numberInfo->DecimalDigits = 0;
- $this->assertEqual($numberInfo->DecimalDigits,0);
-
- $numberInfo->DecimalSeparator = ',';
- $this->assertEqual($numberInfo->DecimalSeparator,',');
-
- $numberInfo->GroupSeparator = ' ';
- $this->assertEqual($numberInfo->GroupSeparator,' ');
-
- $numberInfo->GroupSizes = array(2,3);
- $groupsize = array(2,3);
- $this->assertEqual($numberInfo->GroupSizes, $groupsize);
-
- $numberInfo->NegativePattern = array('-$$','.');
- $negPattern = array('-$$','.');
- $this->assertEqual($numberInfo->NegativePattern, $negPattern);
-
- $numberInfo->PositivePattern = array('YY','.');
- $negPattern = array('YY','.');
- $this->assertEqual($numberInfo->PositivePattern, $negPattern);
-
- //the default CurrencySymbol symbol
- $numberInfo->CurrencySymbol = '$$$';
- $this->assertEqual($numberInfo->CurrencySymbol, '$$$');
- }
-
- function testLocalizedPatterns()
- {
- $fr = NumberFormatInfo::getInstance('fr');
- $de = NumberFormatInfo::getInstance('de');
- $en = NumberFormatInfo::getInstance('en_US');
-
- $this->assertEqual($fr->DecimalSeparator, ',');
- $this->assertEqual($de->DecimalSeparator, ',');
- $this->assertEqual($en->DecimalSeparator, '.');
-
- $this->assertEqual($fr->GroupSeparator, ' ');
- $this->assertEqual($de->GroupSeparator, '.');
- $this->assertEqual($en->GroupSeparator, ',');
- }
-
-}
-
-?> \ No newline at end of file