From db2340e30157e56566d56df5b350879426e50099 Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 1 Sep 2016 16:10:53 +0000 Subject: [PATCH] don't run client credentials tests for PRs --- tests/Functional/AuthenticationTests.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/Functional/AuthenticationTests.php b/tests/Functional/AuthenticationTests.php index e874d28..31a8be0 100644 --- a/tests/Functional/AuthenticationTests.php +++ b/tests/Functional/AuthenticationTests.php @@ -199,15 +199,13 @@ public function testObtainAccessTokenWithoutAuthenticating() */ public function testAuthenticateViaOAuth2ClientCredentials() { - // $this->markTestSkipped('Client credentials not configured properly.'); + if(getenv('FS_KEY_PASSWORD') === false){ + $this->markTestSkipped('Client credentials not configured properly.'); + } $factory = new StateFactory(); $state = $factory->newCollectionState(); - // Load the key - if(getenv('FS_KEY_PASSWORD') === false){ - throw new \Exception('Password for client key not set in FS_KEY_PASSWORD environment variable; unable to use key for authentication'); - } $key = openssl_pkey_get_private('file://key.pem', getenv('FS_KEY_PASSWORD')); $state->authenticateViaOAuth2ClientCredentials('a0T3000000BkhenEAB', $state->generateClientSecret($key, 1447773012436));