Example #1
0
 public function testIsDouble()
 {
     $this->assertFalse(\Hoimi\Validator::isDouble('abc'));
     $this->assertFalse(\Hoimi\Validator::isDouble('1.0a'));
     $this->assertTrue(\Hoimi\Validator::isDouble(0.1));
     $this->assertTrue(\Hoimi\Validator::isDouble('0.1'));
     $this->assertTrue(\Hoimi\Validator::isDouble('1'));
 }