aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/bshaffer/oauth2-server-php/test/lib/OAuth2
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/bshaffer/oauth2-server-php/test/lib/OAuth2')
-rwxr-xr-x[-rw-r--r--]vendor/bshaffer/oauth2-server-php/test/lib/OAuth2/Storage/BaseTest.php0
-rwxr-xr-x[-rw-r--r--]vendor/bshaffer/oauth2-server-php/test/lib/OAuth2/Storage/Bootstrap.php29
2 files changed, 7 insertions, 22 deletions
diff --git a/vendor/bshaffer/oauth2-server-php/test/lib/OAuth2/Storage/BaseTest.php b/vendor/bshaffer/oauth2-server-php/test/lib/OAuth2/Storage/BaseTest.php
index e841d3ad2..e841d3ad2 100644..100755
--- a/vendor/bshaffer/oauth2-server-php/test/lib/OAuth2/Storage/BaseTest.php
+++ b/vendor/bshaffer/oauth2-server-php/test/lib/OAuth2/Storage/BaseTest.php
diff --git a/vendor/bshaffer/oauth2-server-php/test/lib/OAuth2/Storage/Bootstrap.php b/vendor/bshaffer/oauth2-server-php/test/lib/OAuth2/Storage/Bootstrap.php
index 8e428f9b5..66c93ae5b 100644..100755
--- a/vendor/bshaffer/oauth2-server-php/test/lib/OAuth2/Storage/Bootstrap.php
+++ b/vendor/bshaffer/oauth2-server-php/test/lib/OAuth2/Storage/Bootstrap.php
@@ -68,7 +68,7 @@ class Bootstrap
public function getPostgresDriver()
{
try {
- $pdo = new \PDO('pgsql:host=localhost;dbname=oauth2_server_php', 'postgres');
+ $pdo = new \PDO('pgsql:host=localhost;dbname=oauth2_server_php', 'postgres', 'postgres');
return $pdo;
} catch (\PDOException $e) {
@@ -118,7 +118,7 @@ class Bootstrap
if (!$this->mysql) {
$pdo = null;
try {
- $pdo = new \PDO('mysql:host=localhost;', 'root');
+ $pdo = new \PDO('mysql:host=localhost;', 'root', 'root');
} catch (\PDOException $e) {
$this->mysql = new NullStorage('MySQL', 'Unable to connect to MySQL on root@localhost');
}
@@ -352,11 +352,11 @@ class Bootstrap
private function createPostgresDb()
{
- if (!`psql postgres -tAc "SELECT 1 FROM pg_roles WHERE rolname='postgres'"`) {
- `createuser -s -r postgres`;
+ if (!`PGPASSWORD=postgres psql postgres -tAc "SELECT 1 FROM pg_roles WHERE rolname='postgres'" -h localhost -U postgres`) {
+ `PGPASSWORD=postgres createuser -s -r postgres -h localhost -U postgres`;
}
- `createdb -O postgres oauth2_server_php`;
+ `PGPASSWORD=postgres createdb -O postgres oauth2_server_php -h localhost -U postgres`;
}
private function populatePostgresDb(\PDO $pdo)
@@ -366,8 +366,8 @@ class Bootstrap
private function removePostgresDb()
{
- if (trim(`psql -l | grep oauth2_server_php | wc -l`)) {
- `dropdb oauth2_server_php`;
+ if (trim(`PGPASSWORD=postgres psql -l -h localhost -U postgres | grep oauth2_server_php | wc -l`)) {
+ `PGPASSWORD=postgres dropdb oauth2_server_php -h localhost -U postgres`;
}
}
@@ -945,21 +945,6 @@ class Bootstrap
));
}
- public function cleanupTravisDynamoDb($prefix = null)
- {
- if (is_null($prefix)) {
- // skip this when not applicable
- if (!$this->getEnvVar('TRAVIS') || self::DYNAMODB_PHP_VERSION != $this->getEnvVar('TRAVIS_PHP_VERSION')) {
- return;
- }
-
- $prefix = sprintf('build_%s_', $this->getEnvVar('TRAVIS_JOB_NUMBER'));
- }
-
- $client = $this->getDynamoDbClient();
- $this->deleteDynamoDb($client, $prefix);
- }
-
private function getEnvVar($var, $default = null)
{
return isset($_SERVER[$var]) ? $_SERVER[$var] : (getenv($var) ?: $default);