/** * @covers phpDocumentor\Descriptor\FunctionDescriptor::setArguments * @covers phpDocumentor\Descriptor\FunctionDescriptor::getArguments */ public function testSettingAndGettingArguments() { $this->assertInstanceOf('phpDocumentor\\Descriptor\\Collection', $this->fixture->getArguments()); $mockInstance = m::mock('phpDocumentor\\Descriptor\\Collection'); $mock =& $mockInstance; $this->fixture->setArguments($mock); $this->assertSame($mockInstance, $this->fixture->getArguments()); }
/** * Adds the given argument to the function. * * @param FunctionDescriptor $functionDescriptor * @param ArgumentDescriptor $argumentDescriptor * * @return void */ protected function addArgumentDescriptorToFunction($functionDescriptor, $argumentDescriptor) { $functionDescriptor->getArguments()->set($argumentDescriptor->getName(), $argumentDescriptor); }