Commit 25c4a086 authored by Steve Müller's avatar Steve Müller

set expected exception in connection exception test

parent e83c2d00
......@@ -234,14 +234,11 @@ class ExceptionTest extends \Doctrine\Tests\DbalFunctionalTestCase
$table = $schema->createTable("no_connection");
$table->addColumn('id', 'integer');
try {
$this->setExpectedException('Doctrine\DBAL\Exception\AccessDeniedException', null, $exceptionCode);
foreach ($schema->toSql($conn->getDatabasePlatform()) AS $sql) {
$conn->executeQuery($sql);
}
$this->fail("Did not trigger DBALException with code " . $exceptionCode);
} catch (\Doctrine\DBAL\DBALException $e) {
$this->assertEquals($exceptionCode, $e->getCode(), "Got exception " . $e->getMessage());
}
}
public function getConnectionParams()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment