public function testCanBuildUpCommands() { $c = new Operation(array()); $c->setName('foo')->setClass('Baz')->setDeprecated(false)->setSummary('summary')->setDocumentationUrl('http://www.foo.com')->setHttpMethod('PUT')->setResponseNotes('oh')->setResponseClass('string')->setUri('/foo/bar')->addParam(new Parameter(array('name' => 'test'))); $this->assertEquals('foo', $c->getName()); $this->assertEquals('Baz', $c->getClass()); $this->assertEquals(false, $c->getDeprecated()); $this->assertEquals('summary', $c->getSummary()); $this->assertEquals('http://www.foo.com', $c->getDocumentationUrl()); $this->assertEquals('PUT', $c->getHttpMethod()); $this->assertEquals('oh', $c->getResponseNotes()); $this->assertEquals('string', $c->getResponseClass()); $this->assertEquals('/foo/bar', $c->getUri()); $this->assertEquals(array('test'), $c->getParamNames()); }
/** * @dataProvider iteratorProvider */ public function testDescribeIteratorTest(Operation $operation) { switch ($operation->getName()) { case 'DescribeImages': case 'DescribeReservedInstancesListings': case 'DescribeLicenses': self::log('Not running ' . $operation->getName()); return; } self::log('Testing iterator: ' . $operation->getName()); $iterator = $this->client->getIterator($operation->getName(), null, array('limit' => 25)); $this->assertLessThanOrEqual(25, iterator_count($iterator)); foreach ($iterator as $result) { $this->assertInternalType('array', $result); } }