title: Why Symfony 2 uses NativeSessionStorage for testing?
body: <p>I'm writing tests for my controllers and I get the following error for a controller using session :</p>
  
  <blockquote>
    <p>Failed to start the session because headers have already been sent by \"/home/rightink/public_html/project-file-manager/1.0/vendor/phpunit/phpunit/src/Util/Printer.php\" at line 139.</p>
  </blockquote>
  
  <p>The stacktrace shows that Symfony is using "NativeSessionStorage.php" when executing the tests which should not be the case.</p>
  
  <p>I have the following config_test.yml file :</p>
  
  <pre><code>imports:
  - { resource: config_dev.yml }
  - { resource: parameters_test.yml }
  
  framework:
      test: ~
      session:
          storage_id: session.storage.mock_file
      profiler:
          collect: false
  
  web_profiler:
      toolbar: false
      intercept_redirects: false
  
  swiftmailer:
      disable_delivery: true
  </code></pre>
  
  <p>The controller is using the session like this :</p>
  
  <pre><code>$session = new Session();
  $session-&gt;start();
  </code></pre>
  
  <p>Note : the stacktrace shows that this is the "start" method that leads to the exception.</p>
  
  <p>Any idea of why I got this session error ?</p>
  
  <p>Thanks,</p>
  
  <p>Vincent</p>