Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.

Commit

Permalink
One db per test
Browse files Browse the repository at this point in the history
  • Loading branch information
iangreenleaf committed Jan 28, 2012
1 parent 66a315a commit 3044baa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/Scisr_TestCase.php
Expand Up @@ -4,7 +4,10 @@
class Scisr_TestCase extends PHPUnit_Framework_TestCase
{

private $db;

public function setUp() {
$this->db = new PDO('sqlite::memory:');
chdir(dirname(__FILE__));
}

Expand All @@ -15,7 +18,7 @@ public function tearDown() {

public function getDb()
{
return new PDO('sqlite::memory:');
return $this->db;
}

public function getScisr($className = 'ScisrRunner')
Expand Down

0 comments on commit 3044baa

Please sign in to comment.