title: How to load form types in tests
body: <pre><code>&lt;?php
  namespace Tabl\VenueBundle\Tests\Form;
  
  use Symfony\Component\Form\Test\TypeTestCase;
  use Tabl\VenueBundle\Entity\Venue;
  use Tabl\VenueBundle\Form\VenueType;
  
  class VenueTypeTest extends TypeTestCase
  {
  
      public function testSubmitValidData() {
          $formData = array(
              'title' =&gt; 'Hello World',
          );
  
          $type = new VenueType();
          $form = $this-&gt;factory-&gt;create($type);
  
          $object = new Venue();
          $object-&gt;setTitle('Hello World');
  
          // submit the data to the form directly
          $form-&gt;submit($formData);
  
          $this-&gt;assertTrue($form-&gt;isSynchronized());
          $this-&gt;assertEquals($object, $form-&gt;getData());
  
          $view = $form-&gt;createView();
          $children = $view-&gt;children;
  
          foreach (array_keys($formData) as $key) {
              $this-&gt;assertArrayHasKey($key, $children);
          }
      }
  
  }
  </code></pre>
  
  <p>I keep getting this error message:</p>
  
  <p><code>Symfony\Component\Form\Exception\InvalidArgumentException: Could not load type "places_autocomplete"</code></p>
  
  <p>How can this be fixed? How do I load this type so I could perform a functional test on form?</p>
  
  <p><code>places_autocomplete</code> is a part of the <a href="https://github.com/egeloen/IvoryGoogleMapBundle/blob/master/Resources/doc/usage/places/autocomplete.md" rel="nofollow">Ivory GMaps Bundle</a>.</p>
  
  <p>VenueType.php:
      
  
  <pre><code>namespace Acme\VenueBundle\Form;
  
  use Symfony\Component\Form\AbstractType;
  use Symfony\Component\Form\FormBuilderInterface;
  use Symfony\Component\OptionsResolver\OptionsResolverInterface;
  use Symfony\Bundle\FrameworkBundle\Routing\Router;
  use Acme\VenueBundle\Entity\Attribute;
  use Acme\VenueBundle\Form\AttributeType;
  
  class VenueType extends AbstractType {
      public function buildForm(FormBuilderInterface $builder, array $options)
      {
          $builder
              -&gt;add('title')
              -&gt;add('address', 'places_autocomplete' , ['attr' =&gt; ['placeholder' =&gt; 'Start typing for suggestions'], 'label'=&gt;'Location'])
              -&gt;add('attributes', 'entity', array(
                  'multiple'      =&gt; true,
                  'expanded'      =&gt; true,
                  'property'      =&gt; 'icon',
                  'class'         =&gt; 'AcmeVenueBundle:Attribute',
              ))
              -&gt;add('finish', 'submit');
      }
  
      public function setDefaultOptions(OptionsResolverInterface $resolver)
      {
          $resolver-&gt;setDefaults(array(
              'data_class' =&gt; 'Acme\VenueBundle\Entity\Venue'
          ));
      }
  
      public function getName()
      {
          return 'venue';
      }
  }
  </code></pre>