Author: FabianLange
Date: 2010-02-16 12:59:27 +0100 (Tue, 16 Feb 2010)
New Revision: 28051
Modified:
branches/1.3/test/unit/widget/i18n/sfWidgetFormI18nChoiceCountryTest.php
branches/1.3/test/unit/widget/i18n/sfWidgetFormI18nChoiceCurrencyTest.php
Log:
[1.3] added tests for ICU upgrade
Modified:
branches/1.3/test/unit/widget/i18n/sfWidgetFormI18nChoiceCountryTest.php
===================================================================
--- branches/1.3/test/unit/widget/i18n/sfWidgetFormI18nChoiceCountryTest.php
2010-02-16 11:59:07 UTC (rev 28050)
+++ branches/1.3/test/unit/widget/i18n/sfWidgetFormI18nChoiceCountryTest.php
2010-02-16 11:59:27 UTC (rev 28051)
@@ -10,7 +10,7 @@
require_once(dirname(__FILE__).'/../../../bootstrap/unit.php');
-$t = new lime_test(6);
+$t = new lime_test(8);
$dom = new DomDocument('1.0', 'utf-8');
$dom->validateOnParse = true;
@@ -38,6 +38,11 @@
$t->is($css->matchSingle('#country option[value="FR"]')->getValue(), 'France',
'->render() renders all countries as option tags');
$t->is(count($css->matchAll('#country
option[value="FR"][selected="selected"]')->getNodes()), 1, '->render() renders
all countries as option tags');
+// Test for ICU Upgrade and Ticket #7988
+// should be 0. Tests will break after ICU Update, which is fine. change count
to 0
+$t->is(count($css->matchAll('#country option[value="ZZ"]')), 1, '->render()
does not contain dummy data');
+$t->is(count($css->matchAll('#country option[value="419"]')), 1, '->render()
does not contain region data');
+
// add_empty
$t->diag('add_empty');
$w = new sfWidgetFormI18nChoiceCountry(array('culture' => 'fr', 'add_empty' =>
true));
Modified:
branches/1.3/test/unit/widget/i18n/sfWidgetFormI18nChoiceCurrencyTest.php
===================================================================
--- branches/1.3/test/unit/widget/i18n/sfWidgetFormI18nChoiceCurrencyTest.php
2010-02-16 11:59:07 UTC (rev 28050)
+++ branches/1.3/test/unit/widget/i18n/sfWidgetFormI18nChoiceCurrencyTest.php
2010-02-16 11:59:27 UTC (rev 28051)
@@ -10,7 +10,7 @@
require_once(dirname(__FILE__).'/../../../bootstrap/unit.php');
-$t = new lime_test(6);
+$t = new lime_test(7);
$dom = new DomDocument('1.0', 'utf-8');
$dom->validateOnParse = true;
@@ -38,6 +38,10 @@
$t->is($css->matchSingle('#currency option[value="EUR"]')->getValue(), 'euro',
'->render() renders all currencies as option tags');
$t->is(count($css->matchAll('#currency
option[value="EUR"][selected="selected"]')->getNodes()), 1, '->render() renders
all currencies as option tags');
+// Test for ICU Upgrade
+// should be 0. Test will break after ICU Update, which is fine. change count
to 0
+$t->is(count($css->matchAll('#currency option[value="XXX"]')), 1, '->render()
does not output ICU dummy data');
+
// add_empty
$t->diag('add_empty');
$w = new sfWidgetFormI18nChoiceCurrency(array('culture' => 'fr', 'add_empty'
=> true));
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.