diff options
author | wei <> | 2007-03-30 00:19:53 +0000 |
---|---|---|
committer | wei <> | 2007-03-30 00:19:53 +0000 |
commit | 22b818afcda89e60a1bee299f19d8ff827097e97 (patch) | |
tree | c5e5a75bebffad1ba4668c26a94819a09c3e3ae0 | |
parent | df61f326572b0429c2b289da5fb7b6b5d9592a73 (diff) |
add test case for #567
9 files changed, 111 insertions, 1 deletions
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" %>
+<com:TContent ID="Content">
+<h2 class="defect">TTranslate Control ignores property Catalogue</h2>
+
+<span id="text1">
+<com:TTranslate>Hello World!</com:TTranslate>
+</span>
+
+<span id="text2">
+<com:TTranslate Catalogue="menu">Hello World!</com:TTranslate>
+</span>
+
+</com:TContent>
\ 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 @@ +<com:TContent ID="Content">
+<h2 class="defect">TTranslate Control ignores property Catalogue</h2>
+
+<span id="text1">
+<com:TTranslate>Hello World!</com:TTranslate>
+</span>
+
+<span id="text2">
+<com:TTranslate Catalogue="menu">Hello World!</com:TTranslate>
+</span>
+
+</com:TContent>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?>
+
+<configuration>
+ <paths>
+ <using namespace="System.I18N.*" />
+ </paths>
+ <modules>
+ <module id="globalization" class="TGlobalization">
+ <translation type="XLIFF"
+ source="Application.pages.Ticket567"
+ catalogue="messages"
+ />
+ </module>
+ </modules>
+
+ <pages MasterClass="Application.pages.Layout" />
+</configuration>
\ 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 @@ +<?xml version="1.0"?> +<xliff version="1.0"> + <file source-language="EN" target-language="en" datatype="plaintext" original="messages" date="2007-03-30T10:10:48Z" product-name="messages"> + <body> + +<trans-unit id="1"> +<source>Hello World!</source> +<target>Cool Earth?</target> +</trans-unit> + +</body> + </file> +</xliff> 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 @@ +<?xml version="1.0"?> +<xliff version="1.0"> + <file source-language="EN" target-language="en" datatype="plaintext" original="messages" date="2007-03-30T10:10:48Z" product-name="messages"> + <body> + +<trans-unit id="1"> +<source>Hello World!</source> +<target>Hot Menu.</target> +</trans-unit> + +</body> + </file> +</xliff> 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 @@ +<?xml version="1.0"?> +<xliff version="1.0"> + <file source-language="EN" target-language="en" datatype="plaintext" original="messages" date="2007-03-30T10:10:48Z" product-name="messages"> + <body> + +<trans-unit id="1"> +<source>Hello World!</source> +<target>WOWOW</target> +</trans-unit> + +</body> + </file> +</xliff> 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 @@ +<?php
+
+class Ticket567TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $this->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 |