Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
Closed
Description
During our update to 2.8 we noticed that thecookbook article on form tests is outdated.
It still says
$type =newTestedType();$form =$this->factory->create($type);
however, passing type instances toFormFactoryInterface::create
is deprecated in favor of FQCNs.
The simple example in the article is trivial to update, but we can't figure out how to do it for form types that have dependencies. Following the article back in the days, we have written tests that look something like this:
// setup collaborators$type =newMyFormType($mock1,$mock2,$moreMocksHere);$form =$this->factory->create($type);// submit, assert, etc.
Is there any documentation available on how to update these tests for Symfony 2.8?
Metadata
Metadata
Assignees
Labels
No labels