summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorwei <>2006-01-06 04:40:33 +0000
committerwei <>2006-01-06 04:40:33 +0000
commitab5bd4f0f9e5b76a219a8b3d353ce32d9255edb9 (patch)
tree79429edebb1ce48623b93d90cf0e37e59a02c53c /tests
parent3b11f3555426a50664e130148fa37e18b8098e28 (diff)
Adding BasicI18N tests
Diffstat (limited to 'tests')
-rw-r--r--tests/FunctionalTests/protected/application.xml24
-rw-r--r--tests/FunctionalTests/protected/pages/Home.page34
-rw-r--r--tests/FunctionalTests/protected/pages/Home.zh_CN.page34
-rw-r--r--tests/FunctionalTests/protected/pages/I18N/BasicI18N.page60
-rw-r--r--tests/FunctionalTests/protected/pages/I18N/BasicI18N.php34
-rw-r--r--tests/FunctionalTests/protected/runtime/config.cachebin0 -> 1543 bytes
-rw-r--r--tests/FunctionalTests/protected/runtime/global.cache1
-rw-r--r--tests/FunctionalTests/protected/tests/HomePageTest.php21
8 files changed, 208 insertions, 0 deletions
diff --git a/tests/FunctionalTests/protected/application.xml b/tests/FunctionalTests/protected/application.xml
new file mode 100644
index 00000000..0bc6a7c7
--- /dev/null
+++ b/tests/FunctionalTests/protected/application.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<application id="FunctionTests" Mode="Debug">
+ <paths>
+ <alias id="Tests" path="." />
+ <using namespace="System.I18N.*" />
+ </paths>
+
+ <modules>
+ <module id="globalization" class="TGlobalization" Culture="zh-CN">
+
+ <!-- The translation type and source -->
+ <translation
+ type="XLIFF"
+ source="Tests.messages"
+ autosave="true"
+ cache="true"
+ />
+ <!-- <translation type="gettext" source="I18N/messages" autosave="true" /> -->
+ <!-- <translation type="SQLite" source="sqlite:///I18N/messages/sqlite_messages.db" autosave="true" /> -->
+ <!-- <translation type="MySQL" source="mysql://root@localhost/i18n_example" autosave="true" /> -->
+ </module>
+ </modules>
+</application> \ No newline at end of file
diff --git a/tests/FunctionalTests/protected/pages/Home.page b/tests/FunctionalTests/protected/pages/Home.page
new file mode 100644
index 00000000..606a17ac
--- /dev/null
+++ b/tests/FunctionalTests/protected/pages/Home.page
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC
+ "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
+ <title>Prado Functional Tests</title>
+ <style type="text/css">
+ /*<![CDATA[*/
+ body
+ {
+ font-family: Georgia, "Times New Roman", Times, serif;
+ }
+ .w3c
+ {
+ margin-top: 2em;
+ display: block;
+ }
+ /*]]>*/
+ </style>
+</head>
+
+<body>
+
+<h1>Prado Functional Tests</h1>
+
+<div class="w3c">
+<a href="http://validator.w3.org/check?uri=referer">
+ Validate XHTML 1.0
+</a>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/FunctionalTests/protected/pages/Home.zh_CN.page b/tests/FunctionalTests/protected/pages/Home.zh_CN.page
new file mode 100644
index 00000000..df7a9cc0
--- /dev/null
+++ b/tests/FunctionalTests/protected/pages/Home.zh_CN.page
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC
+ "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
+ <title>Prado Functional Tests (zh_CN)</title>
+ <style type="text/css">
+ /*<![CDATA[*/
+ body
+ {
+ font-family: Georgia, "Times New Roman", Times, serif;
+ }
+ .w3c
+ {
+ margin-top: 2em;
+ display: block;
+ }
+ /*]]>*/
+ </style>
+</head>
+
+<body>
+
+<h1>Prado Functional Tests (zh_CN)</h1>
+
+<div class="w3c">
+<a href="http://validator.w3.org/check?uri=referer">
+ Validate XHTML 1.0
+</a>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/FunctionalTests/protected/pages/I18N/BasicI18N.page b/tests/FunctionalTests/protected/pages/I18N/BasicI18N.page
new file mode 100644
index 00000000..9d1b8588
--- /dev/null
+++ b/tests/FunctionalTests/protected/pages/I18N/BasicI18N.page
@@ -0,0 +1,60 @@
+<!doctype html public
+ "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
+ <title>Basic I18N Test</title>
+ <style type="text/css">
+ /*<![CDATA[*/
+ body
+ {
+ font-family: Georgia, "Times New Roman", Times, serif;
+ }
+ .w3c
+ {
+ margin-top: 2em;
+ display: block;
+ }
+ /*]]>*/
+ </style>
+</head>
+
+<body>
+<h1>Basic I18N Test</h1>
+<com:TTranslate>
+ Hello {name}
+ <com:TTranslateParameter Key="name">
+ <com:TLabel>
+ <com:TTranslate>Name</com:TTranslate>
+ </com:TLabel>
+ </com:TTranslateParameter>
+</com:TTranslate>
+
+<div>
+<com:TNumberFormat Value="10000" Type="currency"/>
+</div>
+<div><com:TDateFormat /></div>
+
+<div>
+<com:TChoiceFormat Value="0">
+ [0] None |[1] One thing. |[2,Inf) Many things.
+</com:TChoiceFormat><br />
+
+<com:TChoiceFormat Value="1">
+ [0] None |[1] One thing. |[2,Inf) Many things.
+</com:TChoiceFormat><br />
+
+<com:TChoiceFormat Value="5">
+ [0] None |[1] One thing. |[2,Inf) Many things.
+</com:TChoiceFormat>
+</div>
+
+<div class="w3c">
+<a href="http://validator.w3.org/check?uri=referer">
+ Validate XHTML 1.0
+</a>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/FunctionalTests/protected/pages/I18N/BasicI18N.php b/tests/FunctionalTests/protected/pages/I18N/BasicI18N.php
new file mode 100644
index 00000000..50d493d8
--- /dev/null
+++ b/tests/FunctionalTests/protected/pages/I18N/BasicI18N.php
@@ -0,0 +1,34 @@
+<?php
+
+/**
+ * ${classname}
+ *
+ * ${description}
+ *
+ * @author Wei Zhuo<weizhuo[at]gmail[dot]com>
+ * @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $
+ * @package ${package}
+ */
+class BasicI18N extends TPage
+{
+}
+
+/**
+ * ${classname}
+ *
+ * ${description}
+ *
+ * @author Wei Zhuo<weizhuo[at]gmail[dot]com>
+ * @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $
+ * @package ${package}
+ */
+class BasicI18NTestCase extends SeleniumTestCase
+{
+ function testI18N()
+ {
+ $page = Prado::getApplication()->getTestPage(__FILE__);
+ $this->open($page);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/protected/runtime/config.cache b/tests/FunctionalTests/protected/runtime/config.cache
new file mode 100644
index 00000000..1f1f82fd
--- /dev/null
+++ b/tests/FunctionalTests/protected/runtime/config.cache
Binary files differ
diff --git a/tests/FunctionalTests/protected/runtime/global.cache b/tests/FunctionalTests/protected/runtime/global.cache
new file mode 100644
index 00000000..c0bf9e01
--- /dev/null
+++ b/tests/FunctionalTests/protected/runtime/global.cache
@@ -0,0 +1 @@
+a:1:{s:35:"prado:pagestatepersister:privatekey";s:32:"7ff407291c6929ec690bdf57a2dd1a7d";} \ No newline at end of file
diff --git a/tests/FunctionalTests/protected/tests/HomePageTest.php b/tests/FunctionalTests/protected/tests/HomePageTest.php
new file mode 100644
index 00000000..777f27fd
--- /dev/null
+++ b/tests/FunctionalTests/protected/tests/HomePageTest.php
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * ${classname}
+ *
+ * ${description}
+ *
+ * @author Wei Zhuo<weizhuo[at]gmail[dot]com>
+ * @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $
+ * @package ${package}
+ */
+class HomePageTest extends SeleniumTestCase
+{
+ function testHomePage()
+ {
+ $this->open("tests.php");
+ $this->verifyTitle("Prado Functional Tests");
+ }
+}
+
+?> \ No newline at end of file