public function testFactoryInitializesClient() { $client = CloudFormationClient::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://cloudformation.us-west-2.amazonaws.com', $client->getBaseUrl()); }
/** * @param Stack $stack * @return CloudFormationClient */ private function cfn(Stack $stack) { return CloudFormationClient::factory($this->getAwsConfig($stack)); }