/**
  * @covers phpDocumentor\Descriptor\MethodDescriptor::getResponse
  */
 public function testRetrieveReturnTagForResponse()
 {
     $mock = new \stdClass();
     $this->assertNull($this->fixture->getResponse());
     $this->fixture->getTags()->set('return', new Collection(array($mock)));
     $this->assertSame($mock, $this->fixture->getResponse());
 }
 /**
  * @covers phpDocumentor\Descriptor\MethodDescriptor::getCopyright
  * @covers phpDocumentor\Descriptor\DescriptorAbstract::getCopyright
  */
 public function testCopyrightTagsInheritWhenNoneArePresent()
 {
     // Arrange
     $copyrightTagDescriptor = new TagDescriptor('copyright');
     $copyrightCollection = new Collection(array($copyrightTagDescriptor));
     $this->fixture->getTags()->clear();
     $parentProperty = $this->whenFixtureHasMethodInParentClassWithSameName($this->fixture->getName());
     $parentProperty->getTags()->set('copyright', $copyrightCollection);
     // Act
     $result = $this->fixture->getCopyright();
     // Assert
     $this->assertSame($copyrightCollection, $result);
 }
 /**
  * Adds a single reflected Argument to the Method Descriptor.
  *
  * @param ArgumentReflector $argument
  * @param MethodDescriptor  $descriptor
  *
  * @return void
  */
 protected function addArgument($argument, $descriptor)
 {
     $params = $descriptor->getTags()->get('param', array());
     if (!$this->argumentAssembler->getBuilder()) {
         $this->argumentAssembler->setBuilder($this->builder);
     }
     $argumentDescriptor = $this->argumentAssembler->create($argument, $params);
     $descriptor->addArgument($argumentDescriptor->getName(), $argumentDescriptor);
 }