public function testGetAvailableServiceInterfaces()
{
$awsRefClass = new \ReflectionClass(self::CLASS_AWS);
$available = $this->aws->getAvailableServiceInterfaces();
$interfaces = array();
foreach ($awsRefClass->getConstants() as $k => $v) {
if (strpos($k, 'SERVICE_INTERFACE_') === 0) {
$interfaces[$k] = $v;
$this->assertContains($v, $available, 'Missing interface ' . $v . ' in available.');
}
}
foreach ($interfaces as $serviceInterfaceName) {
$instance = $this->aws->{$serviceInterfaceName};
$this->assertInstanceOf('Scalr\\Service\\Aws\\' . ucfirst($serviceInterfaceName), $instance, 'Illegal service interface instance object');
}
//Test that region does not need here.
$this->getEnvironment()->aws->iam;
}