- // patch for PostgreSql >= 10
- if ((float) ($this->_conn->getWrappedConnection()->getServerVersion()) >= 10) {
+ // the `method_exists` is only to avoid test to fail:
+ // DAMA\DoctrineTestBundle\Doctrine\DBAL\StaticConnection doesn't support the `getServerVersion`
+ if (method_exists($this->_conn->getWrappedConnection(), 'getServerVersion') && (float) ($this->_conn->getWrappedConnection()->getServerVersion()) >= 10) {