summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php')
-rw-r--r--tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php26
1 files changed, 24 insertions, 2 deletions
diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php
index e9a6226a..ace6291b 100644
--- a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php
+++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php
@@ -5,10 +5,32 @@
class ActiveControl extends TPage
{
- public function control1onCallback($sender, $param)
+ static private $_colors = array('red', 'green', 'blue', 'purple','black','orange');
+
+ public function slowResponse($sender, $param)
{
- sleep(5);
+ sleep(3);
$this->label1->setText("The time is ".time()." from ".$sender->ID);
+ $this->label1->setForeColor($this->getColor());
+ $this->label1->renderControl($param->getOutput());
+
+ $this->panel2->setVisible(true);
+ $this->panel1->setBackColor($this->getColor());
+ $this->panel1->renderControl($param->getOutput());
+ $this->getCallbackClient()->shake($this->panel1);
+ }
+
+ public function fastResponse($sender, $param)
+ {
+ $this->label2->setText("Muahaha !!! the time is ".time()." from ".$sender->ID);
+ $style['color'] = $this->getColor();
+ $this->getCallbackClient()->setStyle($this->label2, $style);
+ $this->getCallbackClient()->shake($this->label2);
+ }
+
+ private function getColor()
+ {
+ return self::$_colors[rand(0,count(self::$_colors)-1)];
}
}
?>