diff options
author | tof <> | 2007-06-20 13:15:38 +0000 |
---|---|---|
committer | tof <> | 2007-06-20 13:15:38 +0000 |
commit | 149f7f6155c80bed9e05f700ca7d7001c65e84bf (patch) | |
tree | 94ae519bd458d14f9f3ac512807368de76980108 | |
parent | f863d96b3eabcb639265f037932a932cf0269f71 (diff) |
Add Functional Test for Ticket 653
7 files changed, 96 insertions, 1 deletions
diff --git a/.gitattributes b/.gitattributes index 8ef7f0cd..e1f9f484 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2425,6 +2425,7 @@ tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php -text tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php -text tests/FunctionalTests/tickets.php -text tests/FunctionalTests/tickets/index.php -text +tests/FunctionalTests/tickets/protected/application.xml -text tests/FunctionalTests/tickets/protected/messages/en/messages.xml -text tests/FunctionalTests/tickets/protected/pages/DActiveDropDownList2.php -text tests/FunctionalTests/tickets/protected/pages/Layout.php -text @@ -2531,6 +2532,8 @@ tests/FunctionalTests/tickets/protected/pages/Ticket606.page -text tests/FunctionalTests/tickets/protected/pages/Ticket609.page -text tests/FunctionalTests/tickets/protected/pages/Ticket614.page -text tests/FunctionalTests/tickets/protected/pages/Ticket617.page -text +tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.tpl -text +tests/FunctionalTests/tickets/protected/pages/Ticket653/ticket653.page -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 @@ -2570,6 +2573,7 @@ tests/FunctionalTests/tickets/tests/Ticket578TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket585TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket586TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket587TestCase.php -text +tests/FunctionalTests/tickets/tests/Ticket653TestCase.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/application.xml b/tests/FunctionalTests/tickets/protected/application.xml new file mode 100644 index 00000000..6fea47bf --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/application.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<application id="TicketTests" Mode="Debug"> +<modules> + <module id="friendly-url" class="System.Web.TUrlMapping"> + <url ServiceID="testService" ServiceParameter="ticket653" pattern="/ticket653/?" /> + </module> + <module id="request" class="System.Web.THttpRequest" UrlManager="friendly-url"/> +</modules> +<services> + <!-- Define a new PageService, changing default basePath, and a new MasterClass --> + <service id="testService" class="System.Web.Service.TPageService" BasePath="Application.pages.Ticket653"> + <pages MasterClass="Application.pages.Ticket653.Layout" /> + </service> +</services> +</application> diff --git a/tests/FunctionalTests/tickets/protected/pages/Layout.php b/tests/FunctionalTests/tickets/protected/pages/Layout.php index c2a8a44c..0e549fa7 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Layout.php +++ b/tests/FunctionalTests/tickets/protected/pages/Layout.php @@ -7,7 +7,7 @@ class Layout extends TTemplateControl $num = str_replace('Ticket','',$this->getPage()->getPagePath());
$this->getPage()->setTitle("Verifying Ticket $num");
$this->ticketlink->setText("Verifying Ticket $num");
- $this->ticketlink->setNavigateUrl("http://trac.pradosoft.com/ticket/{$num}");
+ $this->ticketlink->setNavigateUrl("http://trac.pradosoft.com/prado/ticket/{$num}");
}
}
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.php b/tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.php new file mode 100644 index 00000000..de4d3b3d --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.php @@ -0,0 +1,13 @@ +<?php + +class Layout extends TTemplateControl +{ + public function onLoad($param) + { + $this->getPage()->setTitle("Verifying Ticket 653"); + $this->ticketlink->setText("Verifying Ticket 653"); + $this->ticketlink->setNavigateUrl("http://trac.pradosoft.com/prado/ticket/653"); + } +} + +?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.tpl b/tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.tpl new file mode 100644 index 00000000..bf2f8fab --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.tpl @@ -0,0 +1,45 @@ +<!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">
+<com:THead Title="PRADO Functional Tests">
+ <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
+ <style type="text/css">
+ /*<![CDATA[*/
+ .defect
+ {
+ color: #c00;
+ font-size: 1.15em;
+ }
+ body
+ {
+ font-family: Georgia, "Times New Roman", Times, serif;
+ }
+ .w3c
+ {
+ margin-top: 2em;
+ display: block;
+ }
+ /*]]>*/
+ </style>
+</com:THead>
+<body>
+<com:TForm>
+<h1><com:THyperLink ID="ticketlink" /></h1>
+
+<com:TContentPlaceHolder ID="Content" />
+<hr style="margin-top: 2em" />
+<com:TJavascriptLogger />
+</com:TForm>
+<div class="w3c">
+<a href="http://validator.w3.org/check?uri=referer">
+ Validate XHTML 1.0
+</a>
+<a href="?page=ViewSource&path=<%= str_replace('.','/', $this->Request->ServiceParameter) %>.page"
+ style="margin: 0 1em;"
+ onclick="window.open(this.href); return false;"
+ onkeypress="window.open(this.href); return false;">View Source</a>
+</div>
+</body>
+</html>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket653/ticket653.page b/tests/FunctionalTests/tickets/protected/pages/Ticket653/ticket653.page new file mode 100644 index 00000000..cab72cc3 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket653/ticket653.page @@ -0,0 +1,3 @@ +<com:TContent ID="Content"> +<span id="textspan">This is the page for Ticket653</span> +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket653TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket653TestCase.php new file mode 100644 index 00000000..c25eb25f --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket653TestCase.php @@ -0,0 +1,15 @@ +<?php
+
+class Ticket653TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ // Open with 'Friendly URL'
+ $this->open('tickets/index.php/ticket653');
+ $this->verifyTitle("Verifying Ticket 653", "");
+
+ $this->assertText('textspan', 'This is the page for Ticket653');
+ }
+}
+
+?>
\ No newline at end of file |