summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php
diff options
context:
space:
mode:
authorwei <>2006-05-14 00:30:53 +0000
committerwei <>2006-05-14 00:30:53 +0000
commitae43fa72cdae13bace16a5b8250170e472bb2b87 (patch)
tree6efea16ae0773f5c739bff2cf643f54ba499e5c0 /tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php
parentddc3ea15bbfd0235fe90f3b2211bf4cc605e25d6 (diff)
refactor active controls.
Diffstat (limited to 'tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php')
-rw-r--r--tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php
new file mode 100644
index 00000000..0c9b16d5
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php
@@ -0,0 +1,36 @@
+<?php
+/*
+ * Created on 13/05/2006
+ */
+
+class VisibleUpdate extends TPage
+{
+ function click1($sender)
+ {
+ $this->label1->setText($this->getButtonState($sender));
+
+ //$this->button1->setEnabled(false);
+ $this->button1->setVisible(false);
+ // $this->button2->setEnabled(true);
+ $this->button2->setVisible(true);
+ }
+
+ function click2($sender)
+ {
+ $this->label1->setText($this->getButtonState($sender));
+
+ // $this->button1->setEnabled(true);
+ $this->button1->setVisible(true);
+ /// $this->button2->setEnabled(false);
+ $this->button2->setVisible(false);
+ }
+
+ protected function getButtonState($button)
+ {
+ return "Before you clicked on ".$button->Text.
+ ", Button 1 was ".($this->button1->Enabled ? 'enabled' : 'disabled').
+ " and Button 2 was ".($this->button2->Enabled ? 'enabled' : 'disabled');
+ }
+}
+
+?> \ No newline at end of file