title: Symfony2: Test on ArrayCollection gives "Unreachable field"
body: <p>In a functional test of a form to add members of an ArrayCollection there is this statement:</p>
  
  <blockquote>
    <p>$form['client[members][1][fname]'] = 'Benny';</p>
  </blockquote>
  
  <p>The field name was verified with a DOM inspector.</p>
  
  <p>The console output at this line is:</p>
  
  <pre><code>InvalidArgumentException: Unreachable field "members"
  
  G:\Documents\workspace\sym\vendor\symfony\symfony\src\Symfony\Component\DomCrawler\Form.php:459
  G:\Documents\workspace\sym\vendor\symfony\symfony\src\Symfony\Component\DomCrawler\Form.php:496
  G:\Documents\workspace\sym\vendor\symfony\symfony\src\Symfony\Component\DomCrawler\Form.php:319
  G:\Documents\workspace\sym\src\Mana\ClientBundle\Tests\Controller\ClientControllerTest.php:57
  </code></pre>
  
  <p>What method should be used to test the addition of an ArrayCollection member?</p>
  
  <h3>Edit as requested (n.b., follow redirects is on):</h3>
  
  <blockquote>
  <pre><code>    //link to trigger adding household member form
      $link = $crawler-&gt;selectLink('Add household member')-&gt;link();
      $crawler = $client-&gt;click($link);
      $form = $crawler-&gt;selectButton('Add client')-&gt;form();
      $form['client[members][1][fname]'] = 'Benny';
      $form['client[members][1][dob]'] = "3/12/1999";
      $crawler = $client-&gt;submit($form);
      $this-&gt;assertTrue($crawler-&gt;filter('html:contains("Client View Form")')-&gt;count() &gt; 0);
  </code></pre>
  </blockquote>