From 22b818afcda89e60a1bee299f19d8ff827097e97 Mon Sep 17 00:00:00 2001
From: wei <>
Date: Fri, 30 Mar 2007 00:19:53 +0000
Subject: add test case for #567
---
.gitattributes | 7 +++++++
.../tickets/protected/pages/Layout.php | 4 +++-
.../tickets/protected/pages/Ticket567/Home.page | 13 +++++++++++++
.../tickets/protected/pages/Ticket567/Home2.page | 12 ++++++++++++
.../tickets/protected/pages/Ticket567/config.xml | 17 +++++++++++++++++
.../tickets/protected/pages/Ticket567/en/default.xml | 13 +++++++++++++
.../tickets/protected/pages/Ticket567/en/menu.xml | 13 +++++++++++++
.../protected/pages/Ticket567/en/messages.xml | 13 +++++++++++++
.../tickets/tests/Ticket567TestCase.php | 20 ++++++++++++++++++++
9 files changed, 111 insertions(+), 1 deletion(-)
create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket567/Home.page
create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket567/Home2.page
create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket567/config.xml
create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket567/en/default.xml
create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket567/en/menu.xml
create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket567/en/messages.xml
create mode 100644 tests/FunctionalTests/tickets/tests/Ticket567TestCase.php
diff --git a/.gitattributes b/.gitattributes
index 0a102c8b..d5782845 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1692,6 +1692,12 @@ tests/FunctionalTests/tickets/protected/pages/Ticket463.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket54.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket54Master.php -text
tests/FunctionalTests/tickets/protected/pages/Ticket54Master.tpl -text
+tests/FunctionalTests/tickets/protected/pages/Ticket567/Home.page -text
+tests/FunctionalTests/tickets/protected/pages/Ticket567/Home2.page -text
+tests/FunctionalTests/tickets/protected/pages/Ticket567/config.xml -text
+tests/FunctionalTests/tickets/protected/pages/Ticket567/en/default.xml -text
+tests/FunctionalTests/tickets/protected/pages/Ticket567/en/menu.xml -text
+tests/FunctionalTests/tickets/protected/pages/Ticket567/en/messages.xml -text
tests/FunctionalTests/tickets/protected/pages/Ticket68.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket72.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket72.php -text
@@ -1713,6 +1719,7 @@ tests/FunctionalTests/tickets/tests/Ticket285TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket28TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket463TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket54TestCase.php -text
+tests/FunctionalTests/tickets/tests/Ticket567TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket72TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket93TestCase.php -text
tests/FunctionalTests/validators.php -text
diff --git a/tests/FunctionalTests/tickets/protected/pages/Layout.php b/tests/FunctionalTests/tickets/protected/pages/Layout.php
index c2a8a44c..6959fbe1 100644
--- a/tests/FunctionalTests/tickets/protected/pages/Layout.php
+++ b/tests/FunctionalTests/tickets/protected/pages/Layout.php
@@ -4,7 +4,9 @@ class Layout extends TTemplateControl
{
public function onLoad($param)
{
- $num = str_replace('Ticket','',$this->getPage()->getPagePath());
+ $array = array();
+ preg_match('/\d+/',$this->getPage()->getPagePath(), $array);
+ $num = $array[0];
$this->getPage()->setTitle("Verifying Ticket $num");
$this->ticketlink->setText("Verifying Ticket $num");
$this->ticketlink->setNavigateUrl("http://trac.pradosoft.com/ticket/{$num}");
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket567/Home.page b/tests/FunctionalTests/tickets/protected/pages/Ticket567/Home.page
new file mode 100644
index 00000000..28cb3157
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket567/Home.page
@@ -0,0 +1,13 @@
+<%@ Application.Globalization.TranslationCatalogue="default" %>
+
+TTranslate Control ignores property Catalogue
+
+
+Hello World!
+
+
+
+Hello World!
+
+
+
\ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket567/Home2.page b/tests/FunctionalTests/tickets/protected/pages/Ticket567/Home2.page
new file mode 100644
index 00000000..ce872c57
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket567/Home2.page
@@ -0,0 +1,12 @@
+
+TTranslate Control ignores property Catalogue
+
+
+Hello World!
+
+
+
+Hello World!
+
+
+
\ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket567/config.xml b/tests/FunctionalTests/tickets/protected/pages/Ticket567/config.xml
new file mode 100644
index 00000000..8d6535f3
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket567/config.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket567/en/default.xml b/tests/FunctionalTests/tickets/protected/pages/Ticket567/en/default.xml
new file mode 100644
index 00000000..b0b30559
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket567/en/default.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+Cool Earth?
+
+
+
+
+
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket567/en/menu.xml b/tests/FunctionalTests/tickets/protected/pages/Ticket567/en/menu.xml
new file mode 100644
index 00000000..a1005adf
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket567/en/menu.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+Hot Menu.
+
+
+
+
+
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket567/en/messages.xml b/tests/FunctionalTests/tickets/protected/pages/Ticket567/en/messages.xml
new file mode 100644
index 00000000..738fdbbd
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket567/en/messages.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+WOWOW
+
+
+
+
+
diff --git a/tests/FunctionalTests/tickets/tests/Ticket567TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket567TestCase.php
new file mode 100644
index 00000000..9d7ff399
--- /dev/null
+++ b/tests/FunctionalTests/tickets/tests/Ticket567TestCase.php
@@ -0,0 +1,20 @@
+open('tickets/index.php?page=Ticket567.Home');
+ $this->verifyTitle("Verifying Ticket 567", "");
+ $this->assertText("text1", "Cool Earth?");
+ $this->assertText("text2", "Hot Menu.");
+
+
+ $this->open('tickets/index.php?page=Ticket567.Home2');
+ $this->verifyTitle("Verifying Ticket 567", "");
+ $this->assertText("text1", "WOWOW");
+ $this->assertText("text2", "Hot Menu.");
+ }
+}
+
+?>
\ No newline at end of file
--
cgit v1.2.3