Commit 252975ec authored by Steve Müller's avatar Steve Müller

test connecting with "application_name" parameter via pdo_pgsql / PostgreSQL

parent bca20314
......@@ -20,6 +20,23 @@ class DriverTest extends AbstractDriverTest
}
}
/**
* @group DBAL-1146
*/
public function testConnectsWithApplicationNameParameter()
{
$parameters = $this->_conn->getParams();
$parameters['application_name'] = 'doctrine';
$user = isset($parameters['user']) ? $parameters['user'] : null;
$password = isset($parameters['password']) ? $parameters['password'] : null;
$connection = $this->driver->connect($parameters, $user, $password);
$statement = $connection->query('SELECT application_name FROM pg_stat_activity');
$this->assertSame('doctrine', $statement->fetchColumn());
}
/**
* {@inheritdoc}
*/
......
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