Esempio n. 1
0
 public function testVisitIntegerNull()
 {
     $visitor = new ValidationVisitor();
     $property = Property::getInteger('test');
     $this->assertTrue($visitor->visitInteger(null, $property, ''));
 }
Esempio n. 2
0
 public function visitInteger($data, Property\IntegerType $property, $path)
 {
     if ($this->validate) {
         parent::visitInteger($data, $property, $path);
     } else {
         $this->assertRequired($data, $property, $path);
     }
     $data = (int) $data;
     return $this->createSimpleProperty($data, $property);
 }