Commit bc46c989 authored by Benjamin Eberlei's avatar Benjamin Eberlei

Better error reporting to fix PostgreSQL tests.

parent 56ef3346
......@@ -230,8 +230,13 @@ class ExceptionTest extends \Doctrine\Tests\DbalFunctionalTestCase
$this->setExpectedException('\Doctrine\DBAL\DBALException', null, $exceptionCode);
foreach ($schema->toSql($conn->getDatabasePlatform()) AS $sql) {
$conn->executeQuery($sql);
try {
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