Skip to content

Commit

Permalink
DBAL-371 Fixed test to work with all RDMS
Browse files Browse the repository at this point in the history
  • Loading branch information
mnapoli committed Oct 24, 2012
1 parent 8d707a5 commit 5e18b56
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL371Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.