[DX] [Form] Add helper method to register form extensions during unit testing
This commit is contained in:
parent
e58be70aca
commit
bab562a987
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user