diff options
Diffstat (limited to 'tests/FunctionalTests/features/protected')
4 files changed, 36 insertions, 0 deletions
diff --git a/tests/FunctionalTests/features/protected/application.xml b/tests/FunctionalTests/features/protected/application.xml index 642152cc..9153f3f7 100644 --- a/tests/FunctionalTests/features/protected/application.xml +++ b/tests/FunctionalTests/features/protected/application.xml @@ -1,6 +1,9 @@ <?xml version="1.0" encoding="utf-8"?>
<application id="FeatureTests" Mode="Debug">
+ <paths>
+ <using namespace="Application.controls.*" />
+ </paths>
<services>
<service id="page" class="TPageService" DefaultPage="FeatureList">
<pages MasterClass="Application.controls.Layout" />
diff --git a/tests/FunctionalTests/features/protected/controls/LabeledTextBox.tpl b/tests/FunctionalTests/features/protected/controls/LabeledTextBox.tpl new file mode 100644 index 00000000..276d03b2 --- /dev/null +++ b/tests/FunctionalTests/features/protected/controls/LabeledTextBox.tpl @@ -0,0 +1,2 @@ +<com:TLabel ID="label" ForControl="textbox" Text="label:" />
+<com:TTextBox ID="textbox" />
\ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/controls/LabeledTextbox.php b/tests/FunctionalTests/features/protected/controls/LabeledTextbox.php new file mode 100644 index 00000000..33396734 --- /dev/null +++ b/tests/FunctionalTests/features/protected/controls/LabeledTextbox.php @@ -0,0 +1,19 @@ +<?php
+/*
+ * Created on 28/04/2006
+ */
+
+class LabeledTextBox extends TCompositeControl
+{
+ public function getTextBox()
+ {
+ return $this->textbox;
+ }
+
+ public function getLabel()
+ {
+ return $this->label;
+ }
+}
+
+?>
diff --git a/tests/FunctionalTests/features/protected/pages/CompositeControl.page b/tests/FunctionalTests/features/protected/pages/CompositeControl.page new file mode 100644 index 00000000..b135445a --- /dev/null +++ b/tests/FunctionalTests/features/protected/pages/CompositeControl.page @@ -0,0 +1,12 @@ +<com:TContent ID="Content">
+<h1>Composite Control Test</h1>
+ <com:LabeledTextBox id="user" Label.Text="username:" /><br />
+ <com:LabeledTextBox id="pass" Label.Text="password:" /><br />
+ <com:TButton Text="Submit" />
+
+<com:TPanel Visible=<%= $this->user->TextBox->Text != "" %> >
+<h2>Result</h2>
+ User: <%= $this->user->TextBox->Text %> Pass: <%= $this->pass->TextBox->Text %>
+</com:TPanel>
+
+</com:TContent>
\ No newline at end of file |