/** * @covers phpDocumentor\Descriptor\DescriptorAbstract::getPath */ public function testGetPath() { $this->assertSame('', $this->fixture->getPath()); /** @var FileDescriptor $file */ $file = m::mock('phpDocumentor\\Descriptor\\FileDescriptor'); $file->shouldReceive('getPath')->andReturn('path'); $this->fixture->setLocation($file); $this->assertSame('path', $this->fixture->getPath()); }
/** * Generates a URL from the given node or returns false if unable. * * @param DescriptorAbstract $node * * @return string|false */ public function __invoke($node) { $name = str_replace(array('/', '\\'), '.', ltrim($node->getPath(), '/')); return '/files/' . $name . '.html'; }