public function visitArray(array $data, Property\ArrayType $property, $path) { if ($this->validate) { parent::visitArray($data, $property, $path); } return $this->createSimpleProperty($data, $property); }
/** * @expectedException \PSX\Data\Schema\ValidationException */ public function testVisitArrayMaxLength() { $visitor = new ValidationVisitor(); $property = Property::getArray('test')->setPrototype(Property::getString('foo')); $property->setMaxLength(1); $this->assertEquals(1, $property->getMaxLength()); $visitor->visitArray(array('foo', 'bar'), $property, ''); }