Commit bc46c989 authored by Benjamin Eberlei's avatar Benjamin Eberlei

Better error reporting to fix PostgreSQL tests.

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