summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorwei <>2006-12-05 23:37:07 +0000
committerwei <>2006-12-05 23:37:07 +0000
commit33b2284955a8f0015922d4c69c5082141b584f27 (patch)
treee23b3805a8c1e3dd70076ae36d2e4733f11d56bc /tests
parent176ee7e9b6c69cf42e7afeeb03db602237a49bc3 (diff)
load the inlineeditor textbox in client side onload.
Diffstat (limited to 'tests')
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page16
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php53
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/Home.php11
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page78
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php13
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/Master1.php7
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/Master1.tpl14
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/MasterTest1.page14
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page10
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php11
-rw-r--r--tests/simple_unit/SqlMap/common.php2
-rw-r--r--tests/simple_unit/SqlMap/sqlite/backup.dbbin32768 -> 24576 bytes
-rw-r--r--tests/simple_unit/SqlMap/sqlite/tests.dbbin32768 -> 24576 bytes
13 files changed, 228 insertions, 1 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page
new file mode 100644
index 00000000..f4bf644c
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page
@@ -0,0 +1,16 @@
+<com:TForm>
+
+<com:TLabel ForControl="DDropTurno" Text="Turno:"/>
+<com:TActiveDropDownList ID="DDropTurno"
+ onSelectedIndexChanged="trocaTurno" AutoPostBack="true"/>
+
+<com:TLabel Text="Código:" ForControl="Codigo"/>
+<com:TActiveTextBox ID="Codigo" MaxLength="10" Columns="2"/>
+
+<com:TLabel Text="Descrição:" ForControl="Descricao"/>
+<com:TActiveTextBox ID="Descricao" MaxLength="25" Columns="25"/>
+
+
+<com:TJavascriptLogger />
+
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php
new file mode 100644
index 00000000..d31c10f6
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php
@@ -0,0 +1,53 @@
+<?php
+
+class GerTurno2 extends TPage {
+
+ private $_turnos = null;
+
+
+ public function onLoad($param) {
+ parent::onLoad($param);
+
+ $this->loadTurnoOptions();
+
+ if (!$this->IsPostBack) {
+ $this->ativaModoEdicao();
+ }
+ }
+
+
+ protected function loadTurnoOptions()
+ {
+ $this->DDropTurno->DataTextField="descricao";
+ $this->DDropTurno->DataValueField="id";
+ $this->_turnos = array(
+ array('id' => 1, 'codigo'=>'test 1', 'descricao' => 'hello 1'),
+ array('id' => 2, 'codigo'=>'test 2', 'descricao' => 'hello 2')
+ );
+ $this->DDropTurno->setDataSource($this->_turnos);
+ $this->DDropTurno->dataBind();
+ }
+
+
+ protected function ativaModoEdicao() {
+ $this->loadDadosTurno($this->DDropTurno->getSelectedValue());
+ }
+
+
+ protected function loadDadosTurno($id) {
+ foreach ($this->_turnos as $key => $tur) {
+ if ($tur['id'] == $id) {
+ $this->Codigo->setText($tur['codigo']);
+ $this->Descricao->setText($tur['descricao']);
+ }
+ }
+ }
+
+
+ public function trocaTurno($sender,$param) {
+ $this->loadDadosTurno($sender->getSelectedValue());
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/Home.php b/tests/FunctionalTests/active-controls/protected/pages/Home.php
new file mode 100644
index 00000000..22b6528a
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/Home.php
@@ -0,0 +1,11 @@
+<?php
+
+class Home extends TPage
+{
+ public function btnTest_OnCallback($sender,$param)
+ {
+ $this->lblTest->Text = "Testing";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page
new file mode 100644
index 00000000..ba3a35db
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page
@@ -0,0 +1,78 @@
+
+<style>
+ .textbox
+ {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 1.2em;
+ display: block;
+ width: 20em;
+ }
+
+ .textbox
+ {
+ padding: 2px 0px 4px 2px;
+ border:1px solid #eee;
+ }
+
+
+ input.textbox
+ {
+ background-color: #ffc;
+ }
+ .loader
+ {
+ position:absolute;
+ right:0px;
+ top:0px;
+ color:white;
+ background-color:#900;
+ padding: 0.5em 1em;
+ }
+ input.required
+ {
+ border: 1px solid red;
+ background-color: pink;
+ }
+</style>
+
+<com:TForm>
+ <com:TInPlaceTextBox
+ ID="Firstname"
+ Text="firstname"
+ CssClass="textbox"
+ ValidationGroup="Group"
+ />
+ <com:TRequiredFieldValidator
+ ControlToValidate="Firstname"
+ ErrorMessage="Firstname required"
+ InitialValue="firstname"
+ ValidationGroup="Group"
+ />
+ <br />
+ <com:TTextBox
+ ID="Lastname"
+ Text="lastname"
+ />
+ <com:TRequiredFieldValidator
+ ControlToValidate="Lastname"
+ ErrorMessage="Lastname required"
+ InitialValue="lastname"
+ ValidationGroup="Group"
+ />
+ <br />
+ <com:TActiveButton ID="active_button"
+ Text="Active Submit"
+ ValidationGroup="Group"
+ CausesValidation="true"
+ OnCallback="button_valid"
+ />
+ <com:TButton ID="passive_button"
+ Text="Passive Submit"
+ ValidationGroup="Group"
+ CausesValidation="true"
+ OnClick="button_valid"
+ />
+ <br />
+ <com:TActiveLabel ID="status" Text="Status:" />
+ <com:TJavascriptLogger />
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php
new file mode 100644
index 00000000..e69ffdf2
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php
@@ -0,0 +1,13 @@
+<?php
+
+class InPlaceWithValidator extends TPage
+{
+ function button_valid($sender, $param){
+
+ $this->status->Text = "Status: ". $this->Firstname->Text.".".$this->Lastname->Text;
+
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/Master1.php b/tests/FunctionalTests/active-controls/protected/pages/Master1.php
new file mode 100644
index 00000000..173a59f0
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/Master1.php
@@ -0,0 +1,7 @@
+<?php
+
+class Master1 extends TTemplateControl
+{
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/Master1.tpl b/tests/FunctionalTests/active-controls/protected/pages/Master1.tpl
new file mode 100644
index 00000000..5e63d57d
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/Master1.tpl
@@ -0,0 +1,14 @@
+...
+<com:TPanel ID="blockMenu">
+ <com:TContentPlaceHolder ID="cphPnlMenu" />
+</com:TPanel>
+
+<com:TPanel ID="blockContent">
+ <com:TContentPlaceHolder ID="cphPnlMain" />
+</com:TPanel>
+
+<com:TPanel ID="blockLogin">
+ <com:TContentPlaceHolder ID="cphPnlLogin" />
+</com:TPanel>
+
+... \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/MasterTest1.page b/tests/FunctionalTests/active-controls/protected/pages/MasterTest1.page
new file mode 100644
index 00000000..7f6863cf
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/MasterTest1.page
@@ -0,0 +1,14 @@
+<%@ MasterClass="Application.pages.Master1" %>
+<com:TContent ID="cphPnlMenu">
+men
+</com:TContent>
+
+<com:TContent ID="cphPnlLogin">
+<fieldset>
+ [color=red]<problem>[/color]
+</fieldset>
+</com:TContent>
+
+<com:TContent ID="cphPnlMain">
+ad
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page
new file mode 100644
index 00000000..2ce98f5b
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page
@@ -0,0 +1,10 @@
+<com:TForm>
+
+<h1>Null State Test</h1>
+
+<com:TActiveLabel ID="lblTest"/>
+<com:TActiveButton OnCallback="btnTest_OnCallback" Text="Clickme"/>
+
+<com:TJavascriptLogger />
+
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php
new file mode 100644
index 00000000..0abd8eb5
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php
@@ -0,0 +1,11 @@
+<?php
+
+class NullStateTest extends TPage
+{
+ public function btnTest_OnCallback($sender,$param)
+ {
+ $this->lblTest->Text = "Testing";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/simple_unit/SqlMap/common.php b/tests/simple_unit/SqlMap/common.php
index 2856f66e..57685c31 100644
--- a/tests/simple_unit/SqlMap/common.php
+++ b/tests/simple_unit/SqlMap/common.php
@@ -76,7 +76,7 @@ class SQLiteBaseTestConfig extends BaseTestConfig
$this->targetFile = realpath(SQLMAP_TESTS.'/sqlite/tests.db');
$this->baseFile = realpath(SQLMAP_TESTS.'/sqlite/backup.db');
$file = realpath($this->targetFile);
- $this->_connection = new TDbConnection("sqlite2:{$file}");
+ $this->_connection = new TDbConnection("sqlite:{$file}");
}
public function getScriptRunner()
diff --git a/tests/simple_unit/SqlMap/sqlite/backup.db b/tests/simple_unit/SqlMap/sqlite/backup.db
index fa66b2cc..4f5a353d 100644
--- a/tests/simple_unit/SqlMap/sqlite/backup.db
+++ b/tests/simple_unit/SqlMap/sqlite/backup.db
Binary files differ
diff --git a/tests/simple_unit/SqlMap/sqlite/tests.db b/tests/simple_unit/SqlMap/sqlite/tests.db
index fa66b2cc..290c8899 100644
--- a/tests/simple_unit/SqlMap/sqlite/tests.db
+++ b/tests/simple_unit/SqlMap/sqlite/tests.db
Binary files differ