Ejemplo n.º 1
0
 /**
  *
  * @param FileCollection $sharedFiles
  * @param Context        $context
  */
 protected function putDeferedSharedFiles($sharedFiles, Context $context)
 {
     $basepath = $this->transporter->getPath();
     $sharedPath = $basepath . '/shared';
     foreach ($sharedFiles as $file) {
         $src = FilePath::join($context->getBuilddir(), $file);
         $sharedFilepath = $sharedPath . '/' . $file;
         if (false === file_exists($src)) {
             // @todo we might wanna ask the user if he likes to continue or abort
             if ($this->io) {
                 $this->io->write(sprintf('<error>Warning</error> <comment>%s</comment> not found', $src));
             }
             continue;
         }
         $this->transporter->put($src, $sharedFilepath);
     }
 }
Ejemplo n.º 2
0
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testPutThrowsExceptionWhenFileDoesnotExist()
 {
     $this->transporter->put($this->transporter->getPath() . '/non/existing/file', 'destination');
 }