public function testHasAdditionalParameters()
 {
     $o = new Operation(array('additionalParameters' => array('type' => 'string', 'name' => 'binks'), 'parameters' => array('foo' => array('type' => 'integer'))));
     $this->assertEquals('string', $o->getAdditionalParameters()->getType());
     $arr = $o->toArray();
     $this->assertEquals(array('type' => 'string'), $arr['additionalParameters']);
 }
Example #2
0
 public function testHasData()
 {
     $o = new Operation(array('data' => array('foo' => 'baz', 'bar' => 123)));
     $o->setData('test', false);
     $this->assertEquals('baz', $o->getData('foo'));
     $this->assertEquals(123, $o->getData('bar'));
     $this->assertNull($o->getData('wfefwe'));
     $this->assertEquals(array('parameters' => array(), 'class' => 'Guzzle\\Service\\Command\\OperationCommand', 'data' => array('foo' => 'baz', 'bar' => 123, 'test' => false), 'responseClass' => 'array', 'responseType' => 'primitive'), $o->toArray());
 }