Inheritance: extends Symfony\Component\Form\AbstractExtension
 public function test2Dot5ValidationApi()
 {
     $validator = $this->getMockBuilder('Symfony\\Component\\Validator\\Validator\\RecursiveValidator')->disableOriginalConstructor()->getMock();
     $metadata = $this->getMockBuilder('Symfony\\Component\\Validator\\Mapping\\ClassMetadata')->disableOriginalConstructor()->getMock();
     $validator->expects($this->once())->method('getMetadataFor')->with($this->identicalTo('Symfony\\Component\\Form\\Form'))->will($this->returnValue($metadata));
     // Verify that the constraints are added
     $metadata->expects($this->once())->method('addConstraint')->with($this->isInstanceOf('Symfony\\Component\\Form\\Extension\\Validator\\Constraints\\Form'));
     $metadata->expects($this->once())->method('addPropertyConstraint')->with('children', $this->isInstanceOf('Symfony\\Component\\Validator\\Constraints\\Valid'));
     $extension = new ValidatorExtension($validator);
     $guesser = $extension->loadTypeGuesser();
     $this->assertInstanceOf('Symfony\\Component\\Form\\Extension\\Validator\\ValidatorTypeGuesser', $guesser);
 }
 public function __construct()
 {
     $builder = Validation::createValidatorBuilder();
     $builder->setConstraintValidatorFactory(new ConstraintValidatorFactory());
     $builder->setMetadataFactory(new LazyLoadingMetadataFactory(new StaticMethodLoader()));
     parent::__construct($builder->getValidator());
 }