Commit ba308004 authored by romanb's avatar romanb

changes on the new test suite.

parent 6329db60
......@@ -5,6 +5,7 @@ class Orm_Component_TestTest extends Doctrine_OrmTestCase
{
protected function setUp()
{
parent::setUp();
$this->loadFixture('forum', 'common', 'users');
}
......
......@@ -11,6 +11,7 @@ class Doctrine_DbalTestSuite extends Doctrine_TestSuite
protected function setUp()
{
// @todo Make DBMS choice configurable
$pdo = new PDO('sqlite::memory:');
$this->sharedFixture['connection'] = $this->loadConnection($pdo, 'sqlite_memory');
}
......
......@@ -22,6 +22,20 @@ class Doctrine_OrmTestCase extends Doctrine_TestCase
*/
private static $_exportedTables = array();
/**
* setUp()
*/
protected function setUp()
{
// Setup a db connection if there is none, yet. This makes it possible
// to run tests that use a connection standalone.
// @todo Make DBMS choice configurable
if ( ! isset($this->sharedFixture['connection'])) {
$pdo = new PDO('sqlite::memory:');
$this->sharedFixture['connection'] = Doctrine_Manager::connection($pdo, 'sqlite_memory');
}
}
/**
* Loads a data fixture into the database. This method must only be called
* from within the setUp() method of testcases. The database will then be
......
......@@ -10,6 +10,7 @@ class Doctrine_OrmTestSuite extends Doctrine_TestSuite
{
protected function setUp()
{
// @todo Make DBMS choice configurable
$pdo = new PDO('sqlite::memory:');
$this->sharedFixture['connection'] = $this->loadConnection($pdo, 'sqlite_memory');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment