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 /tests | |
parent | f863d96b3eabcb639265f037932a932cf0269f71 (diff) |
Add Functional Test for Ticket 653
Diffstat (limited to 'tests')
6 files changed, 92 insertions, 1 deletions
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 |