protected function setUp()
{
$factory = new \ReflectionClass('Symfony\Component\Form\FormFactory');
$this->registry = $factory->getProperty('registry');
$this->registry->setAccessible(true);
$this->guesser = $this->getMockBuilder('Symfony\Component\Form\FormTypeGuesserInterface')->getMock();
$this->type = new FooType();
}