I am trying to test a form type I have creating that uses a field with class entity
here is the creation of the form
$builder
->add('name', 'text')
->add('description', 'textarea')
->add('services', 'entity', array('class' => 'MyBundle:Service', 'group_by' => 'category.name', 'property' => 'name', 'multiple' => true, 'required' => false));
This works very nice when I build the form, but then I am trying to unit test this type
Following this example on how to test my custom form types
I am getting this error
Symfony\Component\Form\Exception\Exception: Could not load type "entity"
The error is caused at the beginning of unit test at this command:
$type = new MyType();
$form = $this->factory->create($type);
any ideas on how to fix this error in order to test my custom form type using entities?
thanks in advance