mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding tests for phone() pass through to localized class.
This commit is contained in:
parent
fa14f9cebc
commit
0b2fc5b35f
1 changed files with 29 additions and 0 deletions
|
@ -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
|
* Test Case for Validation Class
|
||||||
*
|
*
|
||||||
|
@ -2017,6 +2036,16 @@ class ValidationTest extends CakeTestCase {
|
||||||
$this->assertTrue(Validation::postal('13089-3333'));
|
$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()
|
* test the pass through calling of an alternate locale with postal()
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue