/** * {@inheritdoc} */ private function selfUpdateCommand() { $selfUpdate = new PharUpdateCommand('self-update'); $selfUpdate->setDescription('Updates deployer.phar to the latest version'); $selfUpdate->setManifestUri('https://deployer.org/manifest.json'); return $selfUpdate; }
public function testExecuteCurrent() { $manifest = $this->createFile(); file_put_contents($manifest, '[]'); $command = new Command('upgrade', true); $command->setManifestUri($manifest); $app = new Application('Test', '1.0.0'); $app->getHelperSet()->set(new Helper()); $app->add($command); $tester = new CommandTester($app->get('upgrade')); $tester->execute(array('command' => 'upgrade')); $this->assertRegExp('/Already up-to-date\\./', $tester->getDisplay()); }