else { // If the current version is developing towards an x.y.0 release, there
// might be tagged pre-releases. "git describe" identifies the latest
// one.
$root =
$this->
getDrupalRoot();
$process =
$this->
executeCommand("git -C \"
$root\" describe --abbrev=0 --match=\"
$version_towards-*\""
);
// If there aren't any tagged pre-releases for this version yet, return
// 'dev'. Ensure that any other error from "git describe" causes a test
// failure.
if (!
$process->
isSuccessful()) { $this->
assertErrorOutputContains('No names found, cannot describe anything.'
);
return 'dev';
} // We expect a pre-release, because:
// - A tag should not be of "dev" stability.
// - After a "stable" release is made, \Drupal::VERSION is incremented,
// so there should not be a stable release on that new version.
$stability = VersionParser::
parseStability(trim($process->
getOutput()));
$this->
assertContains($stability,
['alpha', 'beta', 'RC'
]);
} }