Permalink
Browse files

DBAL-371 Fixed test to work with all RDMS

  • Loading branch information...
1 parent 8d707a5 commit 5e18b5672cbed65650af7c2a070da6b6bd45a03c @mnapoli committed Oct 24, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL371Test.php
@@ -26,11 +26,14 @@ protected function setUp()
public function testExceptionCode()
{
- $this->setExpectedException('Doctrine\DBAL\DBALException', null, 23000);
$stmt = $this->_conn->prepare('INSERT INTO DBAL371 VALUES (1)');
$this->_conn->beginTransaction();
$stmt->execute();
- $stmt->execute();
+ try {
+ $stmt->execute();
+ } catch(DBALException $e) {
+ $this->assertGreaterThan(0, $e->getCode());
+ }
$this->_conn->rollback();
}
}

0 comments on commit 5e18b56

Please sign in to comment.