title: How to set up database-heavy unit tests in Symfony2 using PHPUnit?
body: <p>I am quite new to the world of testing and I want to make sure I am on the right track.</p>
  
  <p>I am trying to setup unit tests in a <em>symfony2</em> project using <em>phpunit</em>. </p>
  
  <p><em>PHPUnit</em> is working and the simple default controller tests work fine. (Yet this is not about functional testing but unit testing my application.)</p>
  
  <p>My project relies heavily on database interactions though, and as far as I understand from <a href="http://www.phpunit.de/manual/current/en/database.html" rel="noreferrer">phpunit's documentation</a>, I should set up a class based on <code>\PHPUnit_Extensions_Database_TestCase</code>, then create fixtures for my db and work from there.</p>
  
  <p>Yet, <em>symfony2</em> only offers a <code>WebTestCase</code> class which only extends from <code>\PHPUnit_Framework_TestCase</code> out of the box.</p>
  
  <p>So am I right to assume that I should create my own <code>DataBaseTestCase</code> which mostly copies <code>WebTestCase</code>, only difference being that it extends from <code>\PHPUnit_Extensions_Database_TestCase</code> and implements all its abstract methods?</p>
  
  <p>Or is there another "built-in" recommended workflow for <em>symfony2</em> concerning database-centric tests?</p>
  
  <p>As I want to make sure that my models store and retrieve the right data, I do not want to end up testing the specifics of <em>doctrine</em> by accident.</p>