changes on the new test suite.
This commit is contained in:
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()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
|
parent::setUp();
|
||||||
$this->loadFixture('forum', 'common', 'users');
|
$this->loadFixture('forum', 'common', 'users');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ class Doctrine_DbalTestSuite extends Doctrine_TestSuite
|
||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
|
// @todo Make DBMS choice configurable
|
||||||
$pdo = new PDO('sqlite::memory:');
|
$pdo = new PDO('sqlite::memory:');
|
||||||
$this->sharedFixture['connection'] = $this->loadConnection($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();
|
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
|
* 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
|
* 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()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
|
// @todo Make DBMS choice configurable
|
||||||
$pdo = new PDO('sqlite::memory:');
|
$pdo = new PDO('sqlite::memory:');
|
||||||
$this->sharedFixture['connection'] = $this->loadConnection($pdo, 'sqlite_memory');
|
$this->sharedFixture['connection'] = $this->loadConnection($pdo, 'sqlite_memory');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue