Пример #1
0
 public function testListStacksCommandAndIterator()
 {
     self::log('Execute a ListJobs command and iterator and verify that the results are the same.');
     $commandResults = $this->client->listStacks()->toArray();
     $this->assertArrayHasKey('StackSummaries', $commandResults);
     $iteratorResults = $this->client->getIterator('ListStacks')->toArray();
     $this->assertEquals($commandResults['StackSummaries'], $iteratorResults);
 }
 /**
  * Iterate over the results of a ListStacks operation
  *
  * @example Aws\CloudFormation\CloudFormationClient::listStacks
  */
 public function testListStacksCommandAndIterator()
 {
     self::log('Execute a ListJobs command and iterator and verify that the results are the same.');
     $client = $this->client;
     // @begin
     $result = $this->client->listStacks();
     $stacks = $result['StackSummaries'];
     // Or load the stacks as an iterator
     $iterator = $client->getIterator('ListStacks');
     $stacks = $iterator->toArray();
     // @end
     $this->assertNotNull($stacks);
     $this->assertEquals($result['StackSummaries'], $stacks);
 }