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

set expected exception in connection exception test

parent e83c2d00
...@@ -234,13 +234,10 @@ class ExceptionTest extends \Doctrine\Tests\DbalFunctionalTestCase ...@@ -234,13 +234,10 @@ class ExceptionTest extends \Doctrine\Tests\DbalFunctionalTestCase
$table = $schema->createTable("no_connection"); $table = $schema->createTable("no_connection");
$table->addColumn('id', 'integer'); $table->addColumn('id', 'integer');
try { $this->setExpectedException('Doctrine\DBAL\Exception\AccessDeniedException', null, $exceptionCode);
foreach ($schema->toSql($conn->getDatabasePlatform()) AS $sql) {
$conn->executeQuery($sql); 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());
} }
} }
......
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