/** * @covers phpDocumentor\Descriptor\InterfaceDescriptor::setMethods * @covers phpDocumentor\Descriptor\InterfaceDescriptor::getMethods */ public function testSettingAndGettingMethods() { $this->assertInstanceOf('phpDocumentor\\Descriptor\\Collection', $this->fixture->getMethods()); $mock = m::mock('phpDocumentor\\Descriptor\\Collection'); $this->fixture->setMethods($mock); $this->assertSame($mock, $this->fixture->getMethods()); }
/** * @param string $name The name of the current method. * * @return MethodDescriptor */ protected function whenFixtureHasMethodInImplementedInterfaceWithSameName($name) { $result = new MethodDescriptor(); $result->setName($name); $parent = new InterfaceDescriptor(); $parent->getMethods()->set($name, $result); $class = new ClassDescriptor(); $class->getInterfaces()->set('Implemented', $parent); $this->fixture->setParent($class); return $result; }