Copyright 2011-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Gunnar Wrobel (wrobel@pardus.de)
Ejemplo n.º 1
0
 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());
 }
Ejemplo n.º 2
0
 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));
             }
         }
     }
 }