Skip to content

Commit

Permalink
Add additional test for -0.0
Browse files Browse the repository at this point in the history
In PHP5 `-0.0` doesn't work. Include the other way of making -0 for
PHP5.

Refs #10521
  • Loading branch information
markstory committed Apr 17, 2017
1 parent 9007a7f commit ea05b04
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Cake/Test/Case/Utility/ValidationTest.php
Expand Up @@ -148,10 +148,10 @@ public function tearDown() {
* @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'));
Expand Down

0 comments on commit ea05b04

Please sign in to comment.