Aws\Silex\AwsServiceProviderTest::testRegisterAwsServiceProvider PHP Method

testRegisterAwsServiceProvider() public method

    public function testRegisterAwsServiceProvider()
    {
        // Setup the Silex app and AWS service provider
        $app = new Application();
        $provider = new AwsServiceProvider();
        $app->register($provider, array('aws.config' => array('version' => '2006-03-01', 'region' => 'us-east-1', 'credentials' => ['key' => 'fake-aws-key', 'secret' => 'fake-aws-secret'])));
        // Get an instance of a client (S3) to use for testing
        $s3 = $app['aws']->createS3();
        // Verify that the app and clients created by the SDK receive the provided credentials
        $this->assertEquals('2006-03-01', $app['aws.config']['version']);
        $this->assertEquals('us-east-1', $app['aws.config']['region']);
        $this->assertEquals('2006-03-01', $s3->getApi()->getApiVersion());
        $this->assertEquals('us-east-1', $s3->getRegion());
    }