Add additional test for -0.0

In PHP5 `-0.0` doesn't work. Include the other way of making -0 for
PHP5.

Refs #10521
This commit is contained in:
mark_story 2017-04-16 23:00:21 -04:00
parent 9007a7fe58
commit ea05b04193

View file

@ -148,10 +148,10 @@ class ValidationTest extends CakeTestCase {
* @return void * @return void
*/ */
public function testNotBlank() { public function testNotBlank() {
$this->assertTrue(Validation::notBlank(0)); $this->assertTrue(Validation::notBlank(0), 'zero should not be blank');
$this->assertTrue(Validation::notBlank(0.0)); $this->assertTrue(Validation::notBlank(0.0), 'zero should not be blank');
$this->assertTrue(Validation::notBlank(-0)); $this->assertTrue(Validation::notBlank(0.0 * -1), 'negative 0 should not be blank');
$this->assertTrue(Validation::notBlank(-0.0)); $this->assertTrue(Validation::notBlank(-0.0), 'negative 0 should not be blank');
$this->assertTrue(Validation::notBlank('abcdefg')); $this->assertTrue(Validation::notBlank('abcdefg'));
$this->assertTrue(Validation::notBlank('fasdf ')); $this->assertTrue(Validation::notBlank('fasdf '));
$this->assertTrue(Validation::notBlank('fooo' . chr(243) . 'blabla')); $this->assertTrue(Validation::notBlank('fooo' . chr(243) . 'blabla'));