/**
  * @covers Aws\StorageGateway\StorageGatewayClient::factory
  */
 public function testFactoryInitializesClient()
 {
     $client = StorageGatewayClient::factory(array('key' => 'foo', 'secret' => 'bar', 'region' => 'us-west-2'));
     $this->assertInstanceOf('Aws\\Common\\Signature\\SignatureV4', $client->getSignature());
     $this->assertInstanceOf('Aws\\Common\\Credentials\\Credentials', $client->getCredentials());
     $this->assertEquals('https://storagegateway.us-west-2.amazonaws.com', $client->getBaseUrl());
 }
Esempio n. 2
0
 /**
  * @expectedException \Aws\StorageGateway\Exception\InvalidGatewayRequestException
  * @expectedExceptionMessage The specified activation key was not found.
  */
 public function testFailsToActivateInvalidGateway()
 {
     $this->sg->activateGateway(array('ActivationKey' => 'fooV1-barV9-VVIUB-NKT0I-LRO6V', 'GatewayName' => 'mygateway', 'GatewayTimezone' => GatewayTimezone::GMT_MINUS_1200, 'GatewayRegion' => Region::US_WEST_2, 'GatewayType' => GatewayType::CACHED));
 }