mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding tests for Validation::notEmpty using ISO-8859-1 for App.encoding value, along with additional non-ascii utf-8 assertions. Disproves & closes #6101.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8063 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
0be4f64801
commit
b8feef23a8
1 changed files with 22 additions and 1 deletions
|
@ -77,7 +77,28 @@ class ValidationTestCase extends CakeTestCase {
|
|||
$this->assertTrue(Validation::notEmpty('abcdefg'));
|
||||
$this->assertTrue(Validation::notEmpty('fasdf '));
|
||||
$this->assertTrue(Validation::notEmpty('fooo'.chr(243).'blabla'));
|
||||
|
||||
$this->assertTrue(Validation::notEmpty('abçďĕʑʘπй'));
|
||||
$this->assertTrue(Validation::notEmpty('José'));
|
||||
$this->assertTrue(Validation::notEmpty('é'));
|
||||
$this->assertTrue(Validation::notEmpty('π'));
|
||||
$this->assertFalse(Validation::notEmpty("\t "));
|
||||
$this->assertFalse(Validation::notEmpty(""));
|
||||
|
||||
}
|
||||
/**
|
||||
* testNotEmptyISO88591Encoding method
|
||||
*
|
||||
* @return void
|
||||
* @access public
|
||||
*/
|
||||
function testNotEmptyISO88591AppEncoding() {
|
||||
Configure::write('App.encoding', 'ISO-8859-1');
|
||||
$this->assertTrue(Validation::notEmpty('abcdefg'));
|
||||
$this->assertTrue(Validation::notEmpty('fasdf '));
|
||||
$this->assertTrue(Validation::notEmpty('fooo'.chr(243).'blabla'));
|
||||
$this->assertTrue(Validation::notEmpty('abçďĕʑʘπй'));
|
||||
$this->assertTrue(Validation::notEmpty('José'));
|
||||
$this->assertTrue(Validation::notEmpty(utf8_decode('José')));
|
||||
$this->assertFalse(Validation::notEmpty("\t "));
|
||||
$this->assertFalse(Validation::notEmpty(""));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue