Mise à jour des librairies vendor

This commit is contained in:
Caribana
2018-05-01 14:43:32 +02:00
parent b67375ae8e
commit d776be73fc
5211 changed files with 59115 additions and 25863 deletions

View File

@@ -21,8 +21,9 @@ use Google\Auth\ApplicationDefaultCredentials;
use Google\Auth\Credentials\GCECredentials;
use Google\Auth\Credentials\ServiceAccountCredentials;
use GuzzleHttp\Psr7;
use PHPUnit\Framework\TestCase;
class ADCGetTest extends \PHPUnit_Framework_TestCase
class ADCGetTest extends TestCase
{
private $originalHome;
@@ -101,7 +102,7 @@ class ADCGetTest extends \PHPUnit_Framework_TestCase
}
}
class ADCGetMiddlewareTest extends \PHPUnit_Framework_TestCase
class ADCGetMiddlewareTest extends TestCase
{
private $originalHome;
@@ -156,6 +157,26 @@ class ADCGetMiddlewareTest extends \PHPUnit_Framework_TestCase
ApplicationDefaultCredentials::getMiddleware('a scope', $httpHandler);
}
public function testWithCacheOptions()
{
$keyFile = __DIR__ . '/fixtures' . '/private.json';
putenv(ServiceAccountCredentials::ENV_VAR . '=' . $keyFile);
$httpHandler = getHandler([
buildResponse(200),
]);
$cacheOptions = [];
$cachePool = $this->getMock('Psr\Cache\CacheItemPoolInterface');
$middleware = ApplicationDefaultCredentials::getMiddleware(
'a scope',
$httpHandler,
$cacheOptions,
$cachePool
);
}
public function testSuccedsIfNoDefaultFilesButIsOnGCE()
{
$wantedTokens = [
@@ -196,6 +217,7 @@ class ADCGetCredentialsAppEngineTest extends BaseTest
// removes it if assigned
putenv('HOME=' . $this->originalHome);
putenv(ServiceAccountCredentials::ENV_VAR . '=' . $this->originalServiceAccount);
putenv('GAE_INSTANCE');
}
public function testAppEngineStandard()
@@ -210,7 +232,7 @@ class ADCGetCredentialsAppEngineTest extends BaseTest
public function testAppEngineFlexible()
{
$_SERVER['SERVER_SOFTWARE'] = 'Google App Engine';
$_SERVER['GAE_VM'] = 'true';
putenv('GAE_INSTANCE=aef-default-20180313t154438');
$httpHandler = getHandler([
buildResponse(200, [GCECredentials::FLAVOR_HEADER => 'Google']),
]);
@@ -279,6 +301,26 @@ class ADCGetSubscriberTest extends BaseTest
ApplicationDefaultCredentials::getSubscriber('a scope', $httpHandler);
}
public function testWithCacheOptions()
{
$keyFile = __DIR__ . '/fixtures' . '/private.json';
putenv(ServiceAccountCredentials::ENV_VAR . '=' . $keyFile);
$httpHandler = getHandler([
buildResponse(200),
]);
$cacheOptions = [];
$cachePool = $this->getMock('Psr\Cache\CacheItemPoolInterface');
$subscriber = ApplicationDefaultCredentials::getSubscriber(
'a scope',
$httpHandler,
$cacheOptions,
$cachePool
);
}
public function testSuccedsIfNoDefaultFilesButIsOnGCE()
{
$wantedTokens = [