summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2014-03-25 20:12:05 +0100
committerFabio Bas <ctrlaltca@gmail.com>2014-03-25 22:41:40 +0100
commit4e15c84379b99434515c119b72a6c8afcbf917dd (patch)
tree3194041dedc4649d143a1643ba28294d2ee3e106
parent3d0ecbdc3141740be8d9ddda0a2c6f293dbc099c (diff)
Added new test case directory for github issues; added test case for #504
-rwxr-xr-xtests/FunctionalTests/issues/assets/.gitignore2
-rwxr-xr-xtests/FunctionalTests/issues/index.php6
-rwxr-xr-xtests/FunctionalTests/issues/protected/application.xml12
-rwxr-xr-xtests/FunctionalTests/issues/protected/controls/Layout.php6
-rwxr-xr-xtests/FunctionalTests/issues/protected/controls/Layout.tpl32
-rwxr-xr-xtests/FunctionalTests/issues/protected/pages/Issue504.page14
-rwxr-xr-xtests/FunctionalTests/issues/protected/pages/Issue504.php14
-rwxr-xr-xtests/FunctionalTests/issues/protected/runtime/.gitignore2
-rwxr-xr-xtests/FunctionalTests/issues/tests/Issue504TestCase.php16
9 files changed, 104 insertions, 0 deletions
diff --git a/tests/FunctionalTests/issues/assets/.gitignore b/tests/FunctionalTests/issues/assets/.gitignore
new file mode 100755
index 00000000..d6b7ef32
--- /dev/null
+++ b/tests/FunctionalTests/issues/assets/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/tests/FunctionalTests/issues/index.php b/tests/FunctionalTests/issues/index.php
new file mode 100755
index 00000000..77ddf367
--- /dev/null
+++ b/tests/FunctionalTests/issues/index.php
@@ -0,0 +1,6 @@
+<?php
+
+require_once(dirname(__FILE__).'/../../../framework/prado.php');
+
+$app=new TApplication;
+$app->run();
diff --git a/tests/FunctionalTests/issues/protected/application.xml b/tests/FunctionalTests/issues/protected/application.xml
new file mode 100755
index 00000000..a396dea5
--- /dev/null
+++ b/tests/FunctionalTests/issues/protected/application.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<application id="FeatureTests" Mode="Debug">
+ <paths>
+ <using namespace="Application.controls.*" />
+ </paths>
+ <services>
+ <service id="page" class="TPageService">
+ <pages MasterClass="Application.controls.Layout" />
+ </service>
+ </services>
+</application> \ No newline at end of file
diff --git a/tests/FunctionalTests/issues/protected/controls/Layout.php b/tests/FunctionalTests/issues/protected/controls/Layout.php
new file mode 100755
index 00000000..0ac4d6b3
--- /dev/null
+++ b/tests/FunctionalTests/issues/protected/controls/Layout.php
@@ -0,0 +1,6 @@
+<?php
+
+class Layout extends TTemplateControl
+{
+
+}
diff --git a/tests/FunctionalTests/issues/protected/controls/Layout.tpl b/tests/FunctionalTests/issues/protected/controls/Layout.tpl
new file mode 100755
index 00000000..5234c565
--- /dev/null
+++ b/tests/FunctionalTests/issues/protected/controls/Layout.tpl
@@ -0,0 +1,32 @@
+<!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 Feature Tests">
+ <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
+ <style type="text/css">
+ /*<![CDATA[*/
+ body
+ {
+ font-family: Georgia, "Times New Roman", Times, serif;
+ }
+ .w3c
+ {
+ margin-top: 2em;
+ display: block;
+ }
+ .required
+ {
+ border:1px solid red;
+ background-color: #fdd;
+ }
+ /*]]>*/
+ </style>
+</com:THead>
+<body>
+<com:TForm>
+<com:TContentPlaceHolder ID="Content" />
+</com:TForm>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/FunctionalTests/issues/protected/pages/Issue504.page b/tests/FunctionalTests/issues/protected/pages/Issue504.page
new file mode 100755
index 00000000..ed29b358
--- /dev/null
+++ b/tests/FunctionalTests/issues/protected/pages/Issue504.page
@@ -0,0 +1,14 @@
+ <com:TContent ID="Content">
+ <h1>Issue 504 Test</h1>
+
+ <com:TPanel ID="dlg" DefaultButton="subPanel.buttonOk" >
+ <com:TTextBox ID="textbox1" />
+ <com:TButton ID="buttonDummy" OnCommand="buttonDummyClick" Text="Dummy button" />
+ Panel Content
+ <com:TLabel ID="label1" />
+ <com:TPanel ID="subPanel" >
+ <com:TButton ID="buttonOk" OnCommand="buttonOkClick" Text="Ok button" />
+ </com:TPanel>
+ </com:TPanel>
+ </com:TContent>
+
diff --git a/tests/FunctionalTests/issues/protected/pages/Issue504.php b/tests/FunctionalTests/issues/protected/pages/Issue504.php
new file mode 100755
index 00000000..dd12c960
--- /dev/null
+++ b/tests/FunctionalTests/issues/protected/pages/Issue504.php
@@ -0,0 +1,14 @@
+<?php
+
+class Issue504 extends TPage
+{
+ function buttonOkClick($sender, $param)
+ {
+ $this->label1->Text="buttonOkClick";
+ }
+
+ function buttonDummyClick($sender, $param)
+ {
+ $this->label1->Text="buttonDummyClick";
+ }
+}
diff --git a/tests/FunctionalTests/issues/protected/runtime/.gitignore b/tests/FunctionalTests/issues/protected/runtime/.gitignore
new file mode 100755
index 00000000..d6b7ef32
--- /dev/null
+++ b/tests/FunctionalTests/issues/protected/runtime/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/tests/FunctionalTests/issues/tests/Issue504TestCase.php b/tests/FunctionalTests/issues/tests/Issue504TestCase.php
new file mode 100755
index 00000000..dff27339
--- /dev/null
+++ b/tests/FunctionalTests/issues/tests/Issue504TestCase.php
@@ -0,0 +1,16 @@
+<?php
+
+class Issue504TestCase extends PradoGenericSelenium2Test
+{
+ function test()
+ {
+ $this->url('issues/index.php?page=Issue504');
+ $this->assertContains('Issue 504 Test', $this->source());
+ $base='ctl0_Content_';
+
+ $this->byID("{$base}textbox1")->click();
+ $this->keys(PHPUnit_Extensions_Selenium2TestCase_Keys::ENTER);
+
+ $this->assertText("{$base}label1", "buttonOkClick");
+ }
+}