From 0b2fc5b35f3e848288ad5b6070d1aaf30c4a7c95 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 14 Nov 2009 20:52:11 -0500 Subject: [PATCH] Adding tests for phone() pass through to localized class. --- cake/tests/cases/libs/validation.test.php | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/cake/tests/cases/libs/validation.test.php b/cake/tests/cases/libs/validation.test.php index 2e94e3313..5e76b9b76 100644 --- a/cake/tests/cases/libs/validation.test.php +++ b/cake/tests/cases/libs/validation.test.php @@ -60,6 +60,25 @@ class TestNlValidation { } } +/** + * 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 * @@ -2017,6 +2036,16 @@ class ValidationTest extends CakeTestCase { $this->assertTrue(Validation::postal('13089-3333')); } +/** + * 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() *