title: How to write unit tests in phpunit for classes which make mysql calls?
body: <p>I have a sample class which performs mysql operations as shown below. </p>
  
  <pre><code>&lt;?php
  class ProjectHandler{
      public function getProjectInformation($projectId){
          $prMysql = new prMysql;
          /* Make connection to database */
          $connection = $prMysql-&gt;open_store_database();
          $sql = sprintf("SELECT product_id, projectName FROM test_projects
                  WHERE projectId = %d", $platform_id);
          $test_result = mysql_query($sql, $connection) or die();
          $num_rows = mysql_num_rows($test_result);
          if ($num_rows &gt; 0) {
              $test_row = mysql_fetch_assoc($test_result);
          }
          return $test_row;
      }
  }
  ?&gt;
  </code></pre>
  
  <p>Where <code>prMysql</code> is a wrapper class written for mysql operations. Is it possible to mock the mysql calls in the scenario?</p>