From 7d080ea2d1e74ba869a8bbd17344cb1fde892834 Mon Sep 17 00:00:00 2001 From: Jelle Henkens Date: Tue, 22 May 2012 16:32:16 +0100 Subject: [PATCH] Adding an assert to check for zero prefixed numbers --- lib/Cake/Test/Case/Utility/ValidationTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Cake/Test/Case/Utility/ValidationTest.php b/lib/Cake/Test/Case/Utility/ValidationTest.php index bed0f438b..90de95ca4 100644 --- a/lib/Cake/Test/Case/Utility/ValidationTest.php +++ b/lib/Cake/Test/Case/Utility/ValidationTest.php @@ -1973,6 +1973,7 @@ class ValidationTest extends CakeTestCase { $this->assertFalse(Validation::naturalNumber('-2')); $this->assertFalse(Validation::naturalNumber(-2)); $this->assertFalse(Validation::naturalNumber('0')); + $this->assertFalse(Validation::naturalNumber('050')); $this->assertTrue(Validation::naturalNumber('2')); $this->assertTrue(Validation::naturalNumber(49));