Commit d3f0d9f9 authored by Marco Pivetta's avatar Marco Pivetta

#714 - ignoring PDOExceptions on...

#714 - ignoring PDOExceptions on PDO#getAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES) as per https://bugs.php.net/bug.php?id=68351
parent c66c41ed
......@@ -5,6 +5,7 @@ namespace Doctrine\Tests\DBAL\Driver\PDOPgSql;
use Doctrine\DBAL\Driver\PDOPgSql\Driver;
use Doctrine\Tests\DBAL\Driver\AbstractPostgreSQLDriverTest;
use PDO;
use PDOException;
class DriverTest extends AbstractPostgreSQLDriverTest
{
......@@ -30,7 +31,12 @@ class DriverTest extends AbstractPostgreSQLDriverTest
);
$this->assertInstanceOf('Doctrine\DBAL\Driver\PDOConnection', $connection);
$this->assertTrue($connection->getAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES));
try {
$this->assertTrue($connection->getAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES));
} catch (PDOException $ignored) {
/** @link https://bugs.php.net/bug.php?id=68371 */
}
}
/**
......@@ -51,7 +57,12 @@ class DriverTest extends AbstractPostgreSQLDriverTest
);
$this->assertInstanceOf('Doctrine\DBAL\Driver\PDOConnection', $connection);
$this->assertNotSame(true, $connection->getAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES));
try {
$this->assertNotSame(true, $connection->getAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES));
} catch (PDOException $ignored) {
/** @link https://bugs.php.net/bug.php?id=68371 */
}
}
/**
......@@ -72,7 +83,12 @@ class DriverTest extends AbstractPostgreSQLDriverTest
);
$this->assertInstanceOf('Doctrine\DBAL\Driver\PDOConnection', $connection);
$this->assertTrue($connection->getAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES));
try {
$this->assertTrue($connection->getAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES));
} catch (PDOException $ignored) {
/** @link https://bugs.php.net/bug.php?id=68371 */
}
}
/**
......
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