protected function execute(InputInterface $input, OutputInterface $output) { $git = new GitRepository($input->getArgument('docroot')); if ($input->getOption('tags')) { $git->push()->tags()->execute($input->getArgument('remote')); } else { $git->push()->execute($input->getArgument('remote'), $input->getArgument('branch')); } }
/** * @covers \Bit3\GitPhp\GitRepository::push * @covers \Bit3\GitPhp\Command\PushCommandBuilder::execute */ public function testPushOnUninitializedRepository() { $this->setExpectedException('Bit3\\GitPhp\\GitException'); $this->uninitializedGitRepository->push()->execute('foo'); }