S3Client.php in AmazonS3 7.2
File
tests/Stub/S3Client.php
View source
<?php
namespace Drupal\amazons3Test\Stub;
use Aws\S3\S3Client as AwsS3Client;
use Drupal\amazons3Test\DrupalAdapter\Bootstrap;
use Guzzle\Service\Command\Factory\AliasFactory;
class S3Client extends \Drupal\amazons3\S3Client {
use Bootstrap;
protected static $factoryCalled = FALSE;
public static function resetCalled() {
static::$factoryCalled = FALSE;
}
public static function isFactoryCalled() {
return static::$factoryCalled;
}
protected static function setCommandFactory($client) {
$default = CompositeFactory::getDefaultChain($client);
$default
->add(new AliasFactory($client, static::$commandAliases), 'Guzzle\\Service\\Command\\Factory\\ServiceDescriptionFactory');
$client
->setCommandFactory($default);
}
public static function factory($config = array(), $bucket = NULL) {
static::$factoryCalled = TRUE;
return parent::factory($config, $bucket);
}
}