1
0
mirror of synced 2025-03-21 07:23:55 +03:00

changes on the new test suite.

This commit is contained in:
romanb 2008-02-10 17:29:24 +00:00
parent 6329db601f
commit ba308004b4
4 changed files with 17 additions and 0 deletions

@ -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');
}