Skip to content

Commit

Permalink
test connecting with "application_name" parameter via pdo_pgsql / Pos…
Browse files Browse the repository at this point in the history
…tgreSQL
  • Loading branch information
deeky666 committed Jan 10, 2016
1 parent bca2031 commit 252975e
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,23 @@ protected function setUp()
}
}

/**
* @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}
*/
Expand Down

0 comments on commit 252975e

Please sign in to comment.