public function testGetCurrentVersionWithoutDefinedBranchTypeFails() { $this->vcs->expects($this->any())->method('getCurrentBranch')->will($this->returnValue('develop')); $this->detector = new GitFlowBranch($this->vcs); $this->setExpectedException("\\bonndan\\ReleaseFlow\\Exception", "Cannot detect release or hotfix branch."); $this->detector->getCurrentVersion(); }
/** * Finishes the current git flow hotfix without tagging. * * @return Version * @throws Exception */ public function finishHotfix() { $detector = new GitFlowBranch($this, GitFlowBranch::HOTFIX); $version = $detector->getCurrentVersion(); $command = 'flow hotfix finish -m "' . (string) $version . '" ' . (string) $version . ' 1>/dev/null 2>&1'; $this->executeGitCommand($command); return $version; }