[DX] [Form] Add helper method to register form extensions during unit testing

This commit is contained in:
Pierre du Plessis 2017-02-27 15:17:49 +02:00 committed by Fabien Potencier
parent e58be70aca
commit bab562a987

View File

@ -29,6 +29,9 @@ abstract class FormIntegrationTestCase extends TestCase
{
$this->factory = Forms::createFormFactoryBuilder()
->addExtensions($this->getExtensions())
->addTypeExtensions($this->getTypedExtensions())
->addTypes($this->getTypes())
->addTypeGuessers($this->getTypeGuessers())
->getFormFactory();
}
@ -36,4 +39,19 @@ abstract class FormIntegrationTestCase extends TestCase
{
return array();
}
protected function getTypedExtensions()
{
return array();
}
protected function getTypes()
{
return array();
}
protected function getTypeGuessers()
{
return array();
}
}