Permalink
Browse files

Adding tests for phone() pass through to localized class.

  • Loading branch information...
1 parent fa14f9c commit 0b2fc5b35f3e848288ad5b6070d1aaf30c4a7c95 @markstory markstory committed Nov 15, 2009
Showing with 29 additions and 0 deletions.
  1. +29 −0 cake/tests/cases/libs/validation.test.php
@@ -61,6 +61,25 @@ function postal($check) {
}
/**
+ * TestNlValidation class
+ *
+ * Used to test pass through of Validation
+ *
+ * @package cake.tests.cases.libs
+ */
+class TestDeValidation {
+/**
+ * phone function, for testing phone pass through.
+ *
+ * @param string $check
+ * @return void
+ */
+ function phone($check) {
+ return true;
+ }
+}
+
+/**
* Test Case for Validation Class
*
* @package cake
@@ -2018,6 +2037,16 @@ function testPostal() {
}
/**
+ * test that phone and postal pass to other classes.
+ *
+ * @return void
+ */
+ function testPhoneAndPostalPass() {
+ $this->assertTrue(Validation::postal('text', null, 'testNl'));
+ $this->assertTrue(Validation::phone('text', null, 'testDe'));
+ }
+
+/**
* test the pass through calling of an alternate locale with postal()
*
* @return void

0 comments on commit 0b2fc5b

Please sign in to comment.