From 9e8c47274843d78b68bf3515d26d78438e725528 Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 24 May 2006 14:59:37 +0000 Subject: Added test case for #191. --- .../tickets/protected/pages/Ticket191.page | 19 +++++++++++++++++++ .../tickets/protected/pages/Ticket191.php | 22 ++++++++++++++++++++++ .../tickets/tests/Ticket191TestCase.php | 16 ++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket191.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket191.php create mode 100644 tests/FunctionalTests/tickets/tests/Ticket191TestCase.php (limited to 'tests/FunctionalTests') diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket191.page b/tests/FunctionalTests/tickets/protected/pages/Ticket191.page new file mode 100644 index 00000000..2d673b8d --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket191.page @@ -0,0 +1,19 @@ + + +Global state: + + + +
+ +Your input: + + + +
+ +
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket191.php b/tests/FunctionalTests/tickets/protected/pages/Ticket191.php new file mode 100644 index 00000000..61c2a253 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket191.php @@ -0,0 +1,22 @@ +IsValid) + $this->Application->clearGlobalState('ticket190'); + } + + public function customValidation($sender,$param) + { + $param->IsValid=$this->Application->getGlobalState('ticket190')===$this->TextBox->Text; + } + + public function updateGlobal($sender,$param) + { + $this->Application->setGlobalState('ticket190',$this->TextBox2->Text); + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php new file mode 100644 index 00000000..cc4c1571 --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php @@ -0,0 +1,16 @@ +open('tickets/index.php?page=Ticket191'); + $this->type("ctl0\$Content\$TextBox2", "test"); + $this->clickAndWait("//input[@type='submit' and @name='ctl0\$Content\$ctl0']", ""); + $this->type("ctl0\$Content\$TextBox", "test"); + $this->clickAndWait("//input[@type='submit' and @name='ctl0\$Content\$ctl1']", ""); + $this->verifyNotVisible('ctl0_Content_ctl2'); + } +} + +?> \ No newline at end of file -- cgit v1.2.3