Commit d165e529 authored by Steve Müller's avatar Steve Müller

revert PDO exception wrapping tests

parent cd68d488
......@@ -3,7 +3,6 @@
namespace Doctrine\Tests\DBAL\Functional\Driver;
use Doctrine\DBAL\Driver\PDOConnection;
use Doctrine\DBAL\Driver\PDOException;
use Doctrine\Tests\DbalFunctionalTestCase;
class PDOConnectionTest extends DbalFunctionalTestCase
......@@ -34,45 +33,4 @@ class PDOConnectionTest extends DbalFunctionalTestCase
{
$this->assertFalse($this->driverConnection->requiresQueryForServerVersion());
}
/**
* @expectedException \Doctrine\DBAL\Driver\PDOException
*/
public function testWrapsPDOExceptionsDuringPrepare()
{
$this->driverConnection->prepare('foo');
}
public function testWrapsPDOExceptionsDuringQuery()
{
$failMessage = 'Failed asserting that exception of type "\Doctrine\DBAL\Driver\PDOException" is thrown.';
try {
$this->driverConnection->query('foo');
$this->fail($failMessage);
} catch (PDOException $e) {
}
try {
$this->driverConnection->query('foo', 'bar');
$this->fail($failMessage);
} catch (PDOException $e) {
}
try {
$this->driverConnection->query('foo', 'bar', 'baz');
$this->fail($failMessage);
} catch (PDOException $e) {
}
try {
$this->driverConnection->query('foo', 'bar', 'baz', 'bloo');
$this->fail($failMessage);
} catch (PDOException $e) {
}
}
}
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