diff --git a/cake/tests/cases/libs/validation.test.php b/cake/tests/cases/libs/validation.test.php index 5893a8bc7..ac66c4a28 100644 --- a/cake/tests/cases/libs/validation.test.php +++ b/cake/tests/cases/libs/validation.test.php @@ -177,7 +177,10 @@ class ValidationTest extends CakeTestCase { function testBetween() { $this->assertTrue(Validation::between('abcdefg', 1, 7)); $this->assertTrue(Validation::between('', 0, 7)); + $this->assertTrue(Validation::between('אกあアꀀ豈', 1, 7)); + $this->assertFalse(Validation::between('abcdefg', 1, 6)); + $this->assertFalse(Validation::between('ÆΔΩЖÇ', 1, 3)); } /** @@ -1698,7 +1701,10 @@ class ValidationTest extends CakeTestCase { function testMaxLength() { $this->assertTrue(Validation::maxLength('ab', 3)); $this->assertTrue(Validation::maxLength('abc', 3)); + $this->assertTrue(Validation::maxLength('ÆΔΩЖÇ', 10)); + $this->assertFalse(Validation::maxLength('abcd', 3)); + $this->assertFalse(Validation::maxLength('ÆΔΩЖÇ', 3)); } /** @@ -1709,8 +1715,11 @@ class ValidationTest extends CakeTestCase { */ function testMinLength() { $this->assertFalse(Validation::minLength('ab', 3)); + $this->assertFalse(Validation::minLength('ÆΔΩЖÇ', 10)); + $this->assertTrue(Validation::minLength('abc', 3)); $this->assertTrue(Validation::minLength('abcd', 3)); + $this->assertTrue(Validation::minLength('ÆΔΩЖÇ', 2)); } /**