Skip to content
Permalink
Browse files

add a test for check 0 before natural number

  • Loading branch information...
saeideng committed Nov 9, 2017
1 parent 051db94 commit f96a68f60343694abc19f0a842b7599140bf8792
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/TestCase/Validation/ValidationTest.php
@@ -2907,9 +2907,13 @@ public function testIsInteger()
$this->assertTrue(Validation::isInteger(-10));
$this->assertTrue(Validation::isInteger(0));
$this->assertTrue(Validation::isInteger(10));
$this->assertTrue(Validation::isInteger(012));
$this->assertTrue(Validation::isInteger(-012));
$this->assertTrue(Validation::isInteger('-10'));
$this->assertTrue(Validation::isInteger('0'));
$this->assertTrue(Validation::isInteger('10'));
$this->assertTrue(Validation::isInteger('012'));
$this->assertTrue(Validation::isInteger('-012'));
$this->assertFalse(Validation::isInteger('2.5'));
$this->assertFalse(Validation::isInteger([]));

0 comments on commit f96a68f

Please sign in to comment.
You can’t perform that action at this time.