상속: extends Aws\Common\Client\AbstractClient
예제 #1
0
 /**
  * @covers Aws\OpsWorks\OpsWorksClient::factory
  */
 public function testFactoryInitializesClient()
 {
     $client = OpsWorksClient::factory(array('key' => 'foo', 'secret' => 'bar', 'region' => 'us-east-1'));
     $this->assertInstanceOf('Aws\\Common\\Signature\\SignatureV4', $this->readAttribute($client, 'signature'));
     $this->assertInstanceOf('Aws\\Common\\Credentials\\Credentials', $client->getCredentials());
     $this->assertEquals('https://opsworks.us-east-1.amazonaws.com', $client->getBaseUrl());
 }
 public function __construct()
 {
     parent::__construct();
     // Get configuration values
     $path = realpath(__DIR__ . '/../../../../app/config/parameters.yml');
     $config = Yaml::parse($path);
     $this->parameters = $config['parameters'];
     // Create OpsWorks Client and update stack
     $this->client = OpsWorksClient::factory(array('key' => $this->parameters['aws_api_key'], 'secret' => $this->parameters['aws_api_secret'], 'region' => $this->parameters['aws_region']));
 }
예제 #3
0
 /**
  * @expectedException \Aws\OpsWorks\Exception\ResourceNotFoundException
  */
 public function testParsesErrors()
 {
     self::log('Ensuring errors are parsed correctly');
     $this->client->deleteApp(array('AppId' => 'does-not-exist-foo-123'));
 }