From ea05b041933a854d259d57f132000c72f41bdfae Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 16 Apr 2017 23:00:21 -0400 Subject: [PATCH] Add additional test for -0.0 In PHP5 `-0.0` doesn't work. Include the other way of making -0 for PHP5. Refs #10521 --- lib/Cake/Test/Case/Utility/ValidationTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Cake/Test/Case/Utility/ValidationTest.php b/lib/Cake/Test/Case/Utility/ValidationTest.php index 1cb2bfd08..d10aa2f6e 100644 --- a/lib/Cake/Test/Case/Utility/ValidationTest.php +++ b/lib/Cake/Test/Case/Utility/ValidationTest.php @@ -148,10 +148,10 @@ class ValidationTest extends CakeTestCase { * @return void */ public function testNotBlank() { - $this->assertTrue(Validation::notBlank(0)); - $this->assertTrue(Validation::notBlank(0.0)); - $this->assertTrue(Validation::notBlank(-0)); - $this->assertTrue(Validation::notBlank(-0.0)); + $this->assertTrue(Validation::notBlank(0), 'zero should not be blank'); + $this->assertTrue(Validation::notBlank(0.0), 'zero should not be blank'); + $this->assertTrue(Validation::notBlank(0.0 * -1), 'negative 0 should not be blank'); + $this->assertTrue(Validation::notBlank(-0.0), 'negative 0 should not be blank'); $this->assertTrue(Validation::notBlank('abcdefg')); $this->assertTrue(Validation::notBlank('fasdf ')); $this->assertTrue(Validation::notBlank('fooo' . chr(243) . 'blabla'));