예제 #1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $updater = new Updater(null, false, Updater::STRATEGY_GITHUB);
     $updater->getStrategy()->setPackageName('friendsofphp/pickle');
     $updater->getStrategy()->setPharName(self::PHAR_NAME);
     $updater->getStrategy()->setCurrentLocalVersion($this->getApplication()->getVersion());
     if ($input->getOption('unstable')) {
         $updater->getStrategy()->setStability('unstable');
     }
     if ($updater->update() === false) {
         $output->writeln('<info>Already up-to-date.</info>');
     } else {
         $output->writeln('<info>' . $updater->getLocalPharFileBasename() . ' has been updated!</info>');
     }
 }
예제 #2
0
 public function testConstructorAncilliaryValues()
 {
     $this->assertEquals($this->updater->getLocalPharFileBasename(), 'test');
     $this->assertEquals($this->updater->getTempDirectory(), $this->files);
 }