-
-
Notifications
You must be signed in to change notification settings - Fork 73
Closed
Labels
Description
In version 1.6 we have this problem. Our DB abstraction has some of the following code (simplified):
$resource = @pg_query_params($this->getResource(), $sql, $variables);
if (is_resource($resource) === FALSE) {
throw new Database\QueryException('Database query failed. ' . $this->getLastError());
}For our DB tests, we begin transaction in setUp() and we rollback it in tearDown(). If we want to test some QueryException via Assert::exception(...), in Tester 1.6 is called tearDown before generating our QueryExceptionm because @pg_query_params generate WARNING or NOTICE (which is suppressed by @) and this called new $errorHandler from Framework/TestCase.php line 109. This close transaction in our code and I get bad error message (because I don't have last error...) and after that is called tearDown properly from line 143.