public function testMultiple() { $this->markTestIncomplete(); $do = __DIR__ . '/../../../fixture/docsorigin/multiple'; $docs_origin = new Components_Helper_DocsOrigin($do, $this->_getClient()); $this->assertEquals(array('doc/ONE' => 'http://example.com/ONE', 'doc/TEST' => 'http://example.com/TEST', 'doc/THREE' => 'http://example.com/THREE', 'doc/TWO' => 'http://example.com/TWO'), $docs_origin->getDocuments()); }
public function run() { $docs_origin = $this->_config->getComponent()->getDocumentOrigin(); if ($docs_origin === null) { $this->_output->fail('The component does not offer a DOCS_ORIGIN file with instructions what should be fetched!'); return; } else { $this->_output->info(sprintf('Reading instructions from %s', $docs_origin[0])); $options = $this->_config->getOptions(); $helper = new Components_Helper_DocsOrigin($docs_origin, $this->_client); if (empty($options['pretend'])) { $helper->fetchDocuments($this->_output); } else { foreach ($helper->getDocuments() as $remote => $local) { $this->_output->info(sprintf('Would fetch remote %s into %s!', $remote, $docs_origin[1] . '/' . $local)); } } } }