Exemple #1
0
 function testInteger()
 {
     $type = new IntegerType();
     $this->assertTrue($type->is(0));
     $this->assertFalse($type->is(0.0));
     $this->assertEquals($type->__toString(), 'integer');
 }
Exemple #2
0
 /**
  * @param mixed $value
  * @return boolean
  */
 public function is($value)
 {
     return parent::is($value) && $value >= $this->min && $value <= $this->max;
 }