title: PHPUnit Database Testing. Fixtures not set?
body: <p><em>this post was updated on 17 July 1:35PM UTC+8</em></p>
  
  <p>I have something like</p>
  
  <pre><code>require_once 'PHPUnit/Extensions/Database/TestCase.php';
  
  class TestTest extends PHPUnit_Extensions_Database_TestCase {
      public function getConnection() {
          $pdo = new \PDO('mysql:host=localhost;dbname=jm_test', 'root', 'jm123');
          return $this-&gt;createDefaultDBConnection($pdo, 'jm_test');
      }   
  
      public function getDataSet() {
          return $this-&gt;createXMLDataSet(TEST_DIR . '/Fixtures/test.xml');
      }
  
      public function testRowCount() {
          $this-&gt;assertGreaterThan(0, $this-&gt;getConnection()-&gt;getRowCount('test'));
      }
  }
  </code></pre>
  
  <p><strong>Fixture (test.xml)</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;dataset&gt;
      &lt;table name="test"&gt;
          &lt;column&gt;id&lt;/column&gt;
          &lt;column&gt;key&lt;/column&gt;
          &lt;column&gt;value&lt;/column&gt;
      &lt;/table&gt;
      &lt;row&gt;
          &lt;value&gt;1&lt;/value&gt;
          &lt;value&gt;Key 1&lt;/value&gt;
          &lt;value&gt;Value 1&lt;/value&gt;
      &lt;/row&gt;
      ...
  &lt;/dataset&gt;
  </code></pre>
  
  <p>I always get a row count of 0 why is that?</p>