PHP Class Scalr\Tests\Service\AwsTestCase

Since: 19.10.2012
Author: Vitaliy Demidov ([email protected])
Inheritance: extends Scalr\Tests\TestCase
Show file Open project: scalr/scalr Class Usage Examples

Public Methods

Method Description
getAwsClassName ( string $suffix ) : string Gets Aws class name
getAwsMock ( ) : Aws Gets an Aws mock
getCloudFrontClassName ( string $suffix ) : string Gets CloudFront class name
getContainer ( ) : Container Gets DI Container
getEc2ClassName ( string $suffix ) : string Gets Ec2 class name
getEnvironment ( ) : Scalr_Environment Gets Environment
getFixtureFileContent ( string $filename ) : string Gets fixture file content
getFixtureFilePath ( string $filename ) : string Returns fixtures file path
getFixturesDirectory ( )
getQueryClientResponseMock ( string $body, integer $responseCode = null, Aws $awsStub = null ) : Scalr\Service\Aws\Client\QueryClientResponse Gets QueryClientResponse Mock.
getQueryClientStandartCallResponseMock ( string $method ) : Scalr\Service\Aws\Client\QueryClientResponse Gets standart query client response mock
getRdsClassName ( string $suffix ) : string Gets Rds class name
getRoute53ClassName ( string $suffix ) : string Gets Route53 class name
getServiceInterfaceMock ( string $serviceName, Closure | callback | string $callback = null ) : Scalr\Service\Aws\ServiceInterface Gets an service interface mock object
providerClientType ( ) : array Data provider for client type tests

Protected Methods

Method Description
setUp ( )
skipIfEc2PlatformDisabled ( ) Skips test functionals tests are skipped or if Ec2 platform is not enabled.
tearDown ( )

Method Details

getAwsClassName() public method

Gets Aws class name
public getAwsClassName ( string $suffix ) : string
$suffix string
return string Returns Aws class name strted with Namespace Scalr\\Service\\Aws\\

getAwsMock() public method

Gets an Aws mock
public getAwsMock ( ) : Aws
return Scalr\Service\Aws Returns Aws Mock stub

getCloudFrontClassName() public method

Gets CloudFront class name
public getCloudFrontClassName ( string $suffix ) : string
$suffix string Suffix
return string

getContainer() public method

Gets DI Container
public getContainer ( ) : Container
return Scalr\DependencyInjection\Container

getEc2ClassName() public method

Gets Ec2 class name
public getEc2ClassName ( string $suffix ) : string
$suffix string Suffix
return string

getEnvironment() public method

Gets Environment
public getEnvironment ( ) : Scalr_Environment
return Scalr_Environment

getFixtureFileContent() public method

Gets fixture file content
public getFixtureFileContent ( string $filename ) : string
$filename string A fixture file name
return string Returns fixture file content

getFixtureFilePath() public method

Returns fixtures file path
public getFixtureFilePath ( string $filename ) : string
$filename string A fixture file name
return string Returns fixtures file path

getFixturesDirectory() public method

getQueryClientResponseMock() public method

Gets QueryClientResponse Mock.
public getQueryClientResponseMock ( string $body, integer $responseCode = null, Aws $awsStub = null ) : Scalr\Service\Aws\Client\QueryClientResponse
$body string
$responseCode integer optional The code of the http response
$awsStub Scalr\Service\Aws optional Aws mock
return Scalr\Service\Aws\Client\QueryClientResponse Returns response mock object

getQueryClientStandartCallResponseMock() public method

Gets standart query client response mock
public getQueryClientStandartCallResponseMock ( string $method ) : Scalr\Service\Aws\Client\QueryClientResponse
$method string AWS API action name
return Scalr\Service\Aws\Client\QueryClientResponse Returns QueryClientResponse Mock object

getRdsClassName() public method

Gets Rds class name
public getRdsClassName ( string $suffix ) : string
$suffix string Suffix
return string

getRoute53ClassName() public method

Gets Route53 class name
public getRoute53ClassName ( string $suffix ) : string
$suffix string Suffix
return string

getServiceInterfaceMock() public method

Gets an service interface mock object
public getServiceInterfaceMock ( string $serviceName, Closure | callback | string $callback = null ) : Scalr\Service\Aws\ServiceInterface
$serviceName string Service name (Elb, CloudWatch etc..)
$callback Closure | callback | string optional callback for QueryClientResponse mock
return Scalr\Service\Aws\ServiceInterface Returns service interface mock

providerClientType() public method

Data provider for client type tests
public providerClientType ( ) : array
return array

setUp() protected method

See also: PHPUnit_Framework_TestCase::setUp()
protected setUp ( )

skipIfEc2PlatformDisabled() protected method

Skips test functionals tests are skipped or if Ec2 platform is not enabled.

tearDown() protected method

See also: PHPUnit_Framework_TestCase::tearDown()
protected tearDown ( )