title: Get container in test class Symfony2
body: <p>how I can get container to be able getting mys services in tests classes. I found the solution to <code>require_once dir(__FILE__). '/...../AppKernel.php;</code>, But when I go into <code>WebTestCase</code> class and found </p>
  
  <pre><code>protected static function createClient(array $options = array(), array $server = array())
  {
      static::bootKernel($options);
  
      $client = static::$kernel-&gt;getContainer()-&gt;get('test.client');
      $client-&gt;setServerParameters($server);
  
      return $client;
  }
  </code></pre>
  
  <p>Where Kernel booting, and another class <code>KernelTestCase</code> so I want to know I need to <code>require_once</code> AppKernel file or there is exist some more flexible and better method to get service container? Thanks!</p>