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

This commit is contained in:
mark_story 2009-11-14 20:52:11 -05:00
parent fa14f9cebc
commit 0b2fc5b35f

View file

@ -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()
*