sebastianbergmann / dbunit

DbUnit port for PHP/PHPUnit.
https://phpunit.de/
Other
225 stars 186 forks source link

Catch Base Level Exceptions for PDO Statement Executions #198

Closed jstruzik closed 6 years ago

jstruzik commented 6 years ago

This pull request resolves a small regression with DBUnit where the base level Exception class was no longer being caught during the execute() step of a PDOStatement. This is due to namespace conflicts with the PHPUnit\DbUnit\Operation\Exception class.

The fix will allow DBUnit to print out more useful exception messages when running into a PDO issue.

I've added a test for the RowBased operation only, but I'm open to adding a test for the Replace operation as well.