title: Symfony2 functional testing InvalidArgumentException: The current node list is empty
body: <p>I get "InvalidArgumentException: The current node list is empty." running functional tests through PHPUnit. Here is test i wrote:</p>
  
  <pre><code>public function testAdd()
  {
      $client = static::createClientWithAuthentication('main');
  
      $crawler = $client-&gt;request('GET', 'en/manage');
  
      $send_button = $crawler-&gt;selectButton('submit');
  
      $form = $send_button-&gt;form(array(
          'PrCompany[email]' =&gt; 'test@example.ua',
          'PrCompany[first_name]' =&gt; 'Anton',
          'PrCompany[last_name]' =&gt; 'Tverdiuh',
          'PrCompany[timezone]' =&gt; 'Europe/Amsterdam'
      ));
  
      $form['PrCompany[companies][1]']-&gt;tick();
  
      $client-&gt;submit($form);
  
  
      $this-&gt;assertTrue($crawler-&gt;filter('html:contains("User is invited")')-&gt;count() &gt; 0);
  
  }
  </code></pre>