From 313378ad2905fc07be00183b2acc61284c1c2c39 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sun, 18 Jun 2006 05:02:24 +0000 Subject: Add TCallbackTimer --- .../protected/pages/ActiveButtonTest.page | 2 +- .../protected/pages/CallbackTimerTest.page | 21 ++++++++++++++ .../protected/pages/CallbackTimerTest.php | 27 ++++++++++++++++++ .../tests/CallbackTimerTestCase.php | 21 ++++++++++++++ tests/unit/SQLMap/Dynamic/DynamicTest.php | 15 ++++++++++ tests/unit/SQLMap/gen.php | 33 ++++++++++++++++++++++ 6 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.page create mode 100644 tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.php create mode 100644 tests/FunctionalTests/active-controls/tests/CallbackTimerTestCase.php create mode 100644 tests/unit/SQLMap/Dynamic/DynamicTest.php create mode 100644 tests/unit/SQLMap/gen.php (limited to 'tests') diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page index 8eff7105..c475f17f 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page @@ -7,5 +7,5 @@ - + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.page b/tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.page new file mode 100644 index 00000000..8e99e528 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.page @@ -0,0 +1,21 @@ + +

TCallbackTimer + ViewState Tests

+ + +
+ +
+ + + + + +
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.php b/tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.php new file mode 100644 index 00000000..da87ac0f --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.php @@ -0,0 +1,27 @@ +timer1->startTimer(); + $this->setViewState('count', 0); + } + + function stop_timer($sender, $param) + { + $this->timer1->stopTimer(); + } + + function tick($sender, $param) + { + $count = intval($this->getViewState('count')); + $this->setViewState('count', ++$count); + if($count > 10) + $this->timer1->stopTimer(); + else + $this->label1->Text .= " ".$count; + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/CallbackTimerTestCase.php b/tests/FunctionalTests/active-controls/tests/CallbackTimerTestCase.php new file mode 100644 index 00000000..2954cc51 --- /dev/null +++ b/tests/FunctionalTests/active-controls/tests/CallbackTimerTestCase.php @@ -0,0 +1,21 @@ +open("active-controls/index.php?page=CallbackTimerTest"); + $this->verifyTextPresent("TCallbackTimer + ViewState Tests"); + + $this->assertText("label1", "ViewState Counter :"); + + $this->click("button1"); + + $this->pause(8000); + + $this->assertText("label1", "ViewState Counter : 1 2 3 4 5 6 7 8 9 10"); + + } +} + +?> \ No newline at end of file diff --git a/tests/unit/SQLMap/Dynamic/DynamicTest.php b/tests/unit/SQLMap/Dynamic/DynamicTest.php new file mode 100644 index 00000000..e3e5f245 --- /dev/null +++ b/tests/unit/SQLMap/Dynamic/DynamicTest.php @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/tests/unit/SQLMap/gen.php b/tests/unit/SQLMap/gen.php new file mode 100644 index 00000000..855172ba --- /dev/null +++ b/tests/unit/SQLMap/gen.php @@ -0,0 +1,33 @@ +{$prop}; }\n"; + $setter = "\tpublic function set{$name}(\$value){ \$this->{$prop} = \$value; }\n"; + echo $getter.$setter."\n"; + } +} + +?> \ No newline at end of file -- cgit v1.2.3