/**
* @return PHPUnit_Extensions_Database_DB_IDatabaseConnection
*/
protected final function getConnection()
{
if (!$this->connection) {
if (!self::$doctrine) {
self::$doctrine = $this->getDoctrineConnection();
$this->setupDatabase();
}
$this->connection = $this->createDefaultDbConnection(self::$doctrine->getWrappedConnection(), ':memory:');
}
return $this->connection;
}