1
0
mirror of synced 2024-12-13 22:56:04 +03:00
doctrine2/tests/lib/Doctrine_DbalTestSuite.php

29 lines
837 B
PHP
Raw Normal View History

2008-02-09 21:59:19 +03:00
<?php
/**
* The outermost test suite for all dbal related testcases & suites.
*
* Currently the dbal suite uses a normal connection object, too, just like the orm suite.
* Upon separation of the DBAL and ORM package this suite should just use a DBAL
* connection in the shared fixture.
*/
class Doctrine_DbalTestSuite extends Doctrine_TestSuite
{
protected function setUp()
{
$pdo = new PDO('sqlite::memory:');
$this->sharedFixture['connection'] = $this->loadConnection($pdo, 'sqlite_memory');
}
protected function loadConnection($conn, $name)
{
return Doctrine_Manager::connection($conn, $name);
}
protected function tearDown()
{
Doctrine_Manager::getInstance()->getConnection('sqlite_memory')->close();
$this->sharedFixture = NULL;
}
}