title: PDO connection is not closed when phpunit is running with symfony 2.X
body: <p>We have about 180 unit tests implement <code>webtestcase</code> class and tests are running over controllers.</p>
  
  <p>However when we run the unit tests, they open too many connection to db. Because of too many active tcp connection test are fail after 120th test. All the connection are active while tests are running.</p>
  
  <p>In the tearDown function we call the close function of entity manager, but there is nothing, it doesn't any affect. There is some class keeping the connection object reference, i think. </p>
  
  <p>Because in php manual mentioned about pdo connection closed when the object assigned to null. We also do that but no changes.
  P.S: Our unit tests are functional tests. Works over controller and integrated with db, there is no mock objects</p>
  
  <p>Where is our mistake ? How can we fix the problem?</p>
  
  <p>This my connection parameters in config_test.yml</p>
  
  <pre><code>imports:
      - { resource: config_dev.yml }
  
  framework:
      test: ~
      session:
          storage_id: session.storage.mock_file
  
  web_profiler:
      toolbar: false
      intercept_redirects: false
  
  doctrine:
      dbal:
          driver: pdo_mysql
          port: 3306
          host: localhost
          dbname: mydb
          user: myuser
          password: mypass
          charset: UTF8
  </code></pre>