/** * @param string $currentVersion * @param Manager $manager * @param bool $lockMajor * @param bool $allowPreRelease * * @return string */ private function getNewVersion($currentVersion, Manager $manager, $lockMajor = false, $allowPreRelease = false) { $newVersionObject = $manager->getManifest()->findRecent(Parser::toVersion($currentVersion), $lockMajor, $allowPreRelease)->getVersion(); $newVersion = sprintf('%s.%s', $newVersionObject->getMajor(), implode('.', array_filter([$newVersionObject->getMinor(), $newVersionObject->getPatch()]))); return $newVersion; }
public function testGetManifest() { $this->assertSame($this->manifest, $this->manager->getManifest()); }