'test' ); $test = \Doctrine\DBAL\DriverManager::getConnection($options); } public function testValidPdoInstance() { $options = array( 'pdo' => new \PDO('sqlite::memory:') ); $conn = \Doctrine\DBAL\DriverManager::getConnection($options); $this->assertEquals('sqlite', $conn->getDatabasePlatform()->getName()); } /** * @expectedException \Doctrine\Common\DoctrineException */ public function testCheckParams() { $conn = \Doctrine\DBAL\DriverManager::getConnection(array()); } /** * @expectedException \Doctrine\Common\DoctrineException */ public function testInvalidDriver() { $conn = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'invalid_driver')); } }