AwsInspector\Tests\Model\AutoScaling\RepositoryTest::findLaunchConfigurationsReturnsExpectedCollection PHP Method

findLaunchConfigurationsReturnsExpectedCollection() public method

    public function findLaunchConfigurationsReturnsExpectedCollection()
    {
        $autoScalingClient = $this->getAutoScalingGroupClientMock(['describeLaunchConfigurations']);
        $autoScalingClient->method('describeLaunchConfigurations')->willReturn(new \Aws\Result(['LaunchConfigurations' => [['LaunchConfigurationName' => 'TestLaunchConfiguration'], ['LaunchConfigurationName' => 'TestLaunchConfiguration2']]]));
        $profileManager = $this->getProfileManagerMock(['getClient']);
        $profileManager->method('getClient')->willReturn($autoScalingClient);
        $autoScalingRepository = new \AwsInspector\Model\AutoScaling\Repository('', $profileManager);
        $result = $autoScalingRepository->findLaunchConfigurations();
        $this->assertInstanceOf('\\AwsInspector\\Model\\Collection', $result);
        $this->assertSame(2, $result->count());
    }