-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
During our update to 2.8 we noticed that the cookbook article on form tests is outdated.
It still says
$type = new TestedType();
$form = $this->factory->create($type);
however, passing type instances to FormFactoryInterface::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 = new MyFormType($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