From 550ba06593b467b643862d41a00ca2dd12ee704b Mon Sep 17 00:00:00 2001
From: xue <>
Date: Wed, 2 Aug 2006 02:24:29 +0000
Subject: merge from 3.0 branch till 1320.
---
.../tickets/protected/messages/en/messages.xml | 17 +++++++++++++++
.../tickets/protected/pages/Ticket220.page | 2 +-
.../tickets/protected/pages/Ticket269.page | 10 +++++++++
.../tickets/protected/pages/Ticket285.page | 7 ++++++
.../tickets/protected/pages/Ticket306.page | 12 +++++++++++
.../tickets/protected/pages/Ticket311.page | 18 ++++++++++++++++
.../tickets/protected/pages/Ticket312.page | 11 ++++++++++
.../tickets/protected/pages/config.xml | 8 +++++++
.../tickets/tests/Ticket285TestCase.php | 12 +++++++++++
tests/unit/I18N/core/NumberFormatTest.php | 25 ++++++++++++++++++++--
10 files changed, 119 insertions(+), 3 deletions(-)
create mode 100644 tests/FunctionalTests/tickets/protected/messages/en/messages.xml
create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket269.page
create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket285.page
create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket306.page
create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket311.page
create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket312.page
create mode 100644 tests/FunctionalTests/tickets/tests/Ticket285TestCase.php
(limited to 'tests')
diff --git a/tests/FunctionalTests/tickets/protected/messages/en/messages.xml b/tests/FunctionalTests/tickets/protected/messages/en/messages.xml
new file mode 100644
index 00000000..9b04d076
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/messages/en/messages.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+{field} is required.
+Lütfen '{field}' alanını doldurunuz.
+
+
+
+city
+Şehir
+
+
+
+
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket220.page b/tests/FunctionalTests/tickets/protected/pages/Ticket220.page
index d5b6e182..e4c8fa95 100644
--- a/tests/FunctionalTests/tickets/protected/pages/Ticket220.page
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket220.page
@@ -16,7 +16,7 @@
-
+
Event.observe("button1", "click", function()
{
element = $("<%= $this->label1->ClientID %>");
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket269.page b/tests/FunctionalTests/tickets/protected/pages/Ticket269.page
new file mode 100644
index 00000000..fe5721e3
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket269.page
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket285.page b/tests/FunctionalTests/tickets/protected/pages/Ticket285.page
new file mode 100644
index 00000000..9aeb37e9
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket285.page
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket306.page b/tests/FunctionalTests/tickets/protected/pages/Ticket306.page
new file mode 100644
index 00000000..6a202cc6
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket306.page
@@ -0,0 +1,12 @@
+
+
+
+ {field} is required.
+
+
+ city
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket311.page b/tests/FunctionalTests/tickets/protected/pages/Ticket311.page
new file mode 100644
index 00000000..45b41b7d
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket311.page
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket312.page b/tests/FunctionalTests/tickets/protected/pages/Ticket312.page
new file mode 100644
index 00000000..f6c550c5
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket312.page
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/config.xml b/tests/FunctionalTests/tickets/protected/pages/config.xml
index 48a0114c..9404e969 100644
--- a/tests/FunctionalTests/tickets/protected/pages/config.xml
+++ b/tests/FunctionalTests/tickets/protected/pages/config.xml
@@ -4,5 +4,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket285TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket285TestCase.php
new file mode 100644
index 00000000..cd681c58
--- /dev/null
+++ b/tests/FunctionalTests/tickets/tests/Ticket285TestCase.php
@@ -0,0 +1,12 @@
+open('tickets/index.php?page=Ticket285');
+ $this->assertTextPresent('350.00');
+ $this->assertTextPresent('349.99');
+ }
+}
+?>
\ No newline at end of file
diff --git a/tests/unit/I18N/core/NumberFormatTest.php b/tests/unit/I18N/core/NumberFormatTest.php
index af6a06ca..e136058e 100644
--- a/tests/unit/I18N/core/NumberFormatTest.php
+++ b/tests/unit/I18N/core/NumberFormatTest.php
@@ -12,6 +12,7 @@ class NumberFormatTest extends PHPUnit2_Framework_TestCase {
$formatter = new NumberFormat();
$number = '123456789.125156';
$wanted = '123,456,789.125156';
+
$this->assertEquals($wanted, $formatter->format($number));
//currency
@@ -87,8 +88,7 @@ class NumberFormatTest extends PHPUnit2_Framework_TestCase {
$pattern = '0000';
$wanted = '0005';
- //this should fail!!!
- $this->assertNotEquals($wanted, $formatter->format($number, $pattern));
+ $this->assertEquals($wanted, $formatter->format($number, $pattern));
}
function testFormatWithANegativeValue() {
@@ -105,7 +105,28 @@ class NumberFormatTest extends PHPUnit2_Framework_TestCase {
$expected = "10E";
$this->assertEquals('10E', $formatter->format($number, 'e'));
}
+
+ function testRounding()
+ {
+ $formatter = new NumberFormat();
+
+ $number = 349.999;
+ $pattern = '#.00';
+ $expected = '350.00';
+
+ $this->assertEquals($expected, $formatter->format($number, $pattern));
+ }
+ function testRounding2()
+ {
+ $formatter = new NumberFormat();
+
+ $number = 349.99;
+ $pattern = '#.00';
+ $expected = '349.99';
+
+ $this->assertEquals($expected, $formatter->format($number, $pattern));
+ }
}
?>
\ No newline at end of file
--
cgit v1.2.3