/**
  * @param ClassMetadata     $classMetadata
  * @param \ReflectionMethod $method
  */
 protected function addMethod(ClassMetadata $classMetadata, \ReflectionMethod $method)
 {
     $names = array();
     foreach ($method->getParameters() as $parameter) {
         $names[] = $parameter->getName();
     }
     $classMetadata->addMethod($method->getName(), $names);
 }
 public function testReturnOptions()
 {
     $this->assertTrue(is_array($this->subject->getReturnOptions('MethodName')));
     $this->subject->setReturnOptions('MethodName', ['foo' => 'bar']);
     $this->assertEquals(['foo' => 'bar'], $this->subject->getReturnOptions('MethodName'));
 }
 public function testMethodWithResponse()
 {
     $this->assertEquals('string', $this->classMetadata->getReturnType('methodWithResponse'));
 }