validate() public method

public validate ( $name, $node, $data )
 public function testMinMax()
 {
     $this->if($schema_validator = new SchemaValidator())->and($object = new testedClass($schema_validator))->and($config = array('_min_items' => 2, '_max_items' => 2, '_prototype' => array('_type' => 'number')))->then->boolean($object->validate('test', $config, array('a' => 10, 'b' => 5)))->isEqualTo(true)->exception(function () use($object, $config) {
         $object->validate('test', $config, array('a' => 10));
     })->hasMessage("Prototype node 'test' has not enough children")->exception(function () use($object, $config) {
         $object->validate('test', $config, array('a' => 10, 'b' => 5, 'c' => 2));
     })->hasMessage("Prototype node 'test' has too much children");
 }