summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/protected/pages/Validation/CheckBox.php
diff options
context:
space:
mode:
authorxue <>2006-01-22 00:17:02 +0000
committerxue <>2006-01-22 00:17:02 +0000
commit101d1733f1ed5421161ee40c02d91e55ef9eafcb (patch)
tree855554927c3c25f63c62276e8c1de5db7ab08efd /tests/FunctionalTests/protected/pages/Validation/CheckBox.php
parent0c1b167cebac83e63c05ef780f012d7117ed8b81 (diff)
Added tests for checkbox with validation.
Diffstat (limited to 'tests/FunctionalTests/protected/pages/Validation/CheckBox.php')
-rw-r--r--tests/FunctionalTests/protected/pages/Validation/CheckBox.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/FunctionalTests/protected/pages/Validation/CheckBox.php b/tests/FunctionalTests/protected/pages/Validation/CheckBox.php
new file mode 100644
index 00000000..b85bf383
--- /dev/null
+++ b/tests/FunctionalTests/protected/pages/Validation/CheckBox.php
@@ -0,0 +1,31 @@
+<?php
+
+class CheckBox extends TPage
+{
+ protected function onLoad($param)
+ {
+ if(!$this->IsPostBack)
+ $this->dataBind();
+ }
+}
+
+class CheckBoxTestCase extends SeleniumTestCase
+{
+ function setup()
+ {
+ $this->open(Prado::getApplication()->getTestPage(__FILE__));
+ }
+
+ function testValidator()
+ {
+ $this->assertTextPresent("Basic TRequiredFieldValidator Test1");
+ $this->assertNotVisible("validator1");
+ $this->click("button1");
+ $this->assertVisible("validator1");
+ $this->type("text1", "test");
+ $this->clickAndWait("button1");
+ $this->assertNotVisible("validator1");
+ }
+}
+
+?> \ No newline at end of file