From 8ab196ce6c2d5de323bdd8ebcc11a73814c0cdca Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 26 Apr 2006 21:18:01 +0000 Subject: Merge from 3.0 branch till 971. --- .../validators/tests/DataTypeValidatorTestCase.php | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php (limited to 'tests/FunctionalTests') diff --git a/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php b/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php new file mode 100644 index 00000000..1ca3de5d --- /dev/null +++ b/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php @@ -0,0 +1,49 @@ +open("validators/index.php?page=DataTypeValidator", ""); + $this->verifyTextPresent("Data Type Validator Tests", ""); + $this->clickAndWait("//input[@type='submit' and @value='submit!']", ""); + + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->assertNotVisible("{$base}validator3"); + + $this->type("{$base}textbox1", "a"); + $this->type("{$base}textbox2", "b"); + $this->type("{$base}textbox3", "c"); + $this->click("//input[@type='submit' and @value='submit!']", ""); + + $this->assertVisible("{$base}validator1"); + $this->assertVisible("{$base}validator2"); + $this->assertVisible("{$base}validator3"); + + $this->type("{$base}textbox1", "12"); + $this->type("{$base}textbox2", "12.5"); + $this->type("{$base}textbox3", "2/10/2005"); + $this->clickAndWait("//input[@type='submit' and @value='submit!']", ""); + + $this->assertNotVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->assertNotVisible("{$base}validator3"); + + $this->type("{$base}textbox1", "12.2"); + $this->type("{$base}textbox2", "-12.5"); + $this->type("{$base}textbox3", "2/13/2005"); + $this->click("//input[@type='submit' and @value='submit!']", ""); + + $this->assertVisible("{$base}validator1"); + $this->assertNotVisible("{$base}validator2"); + $this->assertVisible("{$base}validator3"); + } + +} + +?> -- cgit v1.2.3