title: Unit Testing Drupal with DrupalUnitTestCase fails on database-setup
body: <p>Using <code>DrupalUnitTestCase</code> to unit test a Drupal module, fails. I probably forget something.</p>
  
  <p>The test runs fine untill I create an instance of some class:</p>
  
  <pre><code>$foo = new FooBar();
  </code></pre>
  
  <p>In that case, Drupal decides to do some magic and attempts to call the database, in order to find some file in its registry. </p>
  
  <pre><code> Test PDOStatement-&gt;execute() failed: &lt;em class="placeholder"&gt;PDOException&lt;/em&gt;: SQLSTATE[42S02]: Base table  [error]
  or view not found: 1146 Table &amp;#039;td_development.simpletest50921registry&amp;#039; doesn&amp;#039;t exist: SELECT
  filename FROM {registry} WHERE name = :name AND type = :type; Array
  (
      [:name] =&amp;gt; FooBar
      [:type] =&amp;gt; interface
  )
  </code></pre>
  
  <p><code>DrupalUnitTestCase</code>, as opposed to <code>DrupalWebTestCase</code> do not set up a database, by design. So the reason why this fails is clear. </p>
  
  <p>However, I don't want Drupal to go looking in a database when all I want is to create some instance. How to avoid Drupal looking up the file in its registry?</p>