本文整理汇总了PHP中PHPUnit_Runner_Version::version方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Runner_Version::version方法的具体用法?PHP PHPUnit_Runner_Version::version怎么用?PHP PHPUnit_Runner_Version::version使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_Runner_Version
的用法示例。
在下文中一共展示了PHPUnit_Runner_Version::version方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: id
/**
* Returns the current version of PHPUnit.
*
* @return string
*/
public static function id()
{
if (self::$version === NULL) {
$version = new SebastianBergmann\Version('3.8', __DIR__);
self::$version = $version->getVersion();
}
return self::$version;
}
示例2: id
/**
* Returns the current version of PHPUnit.
*
* @return string
*/
public static function id()
{
if (self::$pharVersion !== null) {
return self::$pharVersion;
}
if (self::$version === null) {
$version = new SebastianBergmann\Version('4.8.12', dirname(dirname(__DIR__)));
self::$version = $version->getVersion();
}
return self::$version;
}
示例3: id
/**
* Returns the current version of PHPUnit.
*
* @return string
*/
public static function id()
{
if (self::$version === NULL) {
self::$version = self::VERSION;
if (is_dir(dirname(dirname(__DIR__)) . '/.git')) {
$dir = getcwd();
chdir(__DIR__);
$version = exec('git describe --tags');
chdir($dir);
if ($version) {
self::$version = $version;
}
}
}
return self::$version;
}
示例4: id
/**
* Returns the current version of PHPUnit.
*
* @return string
*/
public static function id()
{
if (self::$version === NULL) {
if (strpos(self::VERSION, '@package_version') === 0) {
$dir = getcwd();
chdir(__DIR__);
$version = exec('git describe --tags');
chdir($dir);
if ($version) {
self::$version = $version;
}
} else {
self::$version = self::VERSION;
}
}
return self::$version;
}
示例5: id
/**
* Returns the current version of PHPUnit.
*
* @return string
*/
public static function id()
{
if (self::$version === NULL) {
self::$version = self::VERSION;
if (is_dir(dirname(dirname(__DIR__)) . '/.git')) {
$dir = getcwd();
chdir(__DIR__);
$version = exec('git describe --tags');
chdir($dir);
if ($version) {
if (count(explode('.', self::VERSION)) == 3) {
self::$version = $version;
} else {
$version = explode('-', $version);
self::$version = self::VERSION . '-' . $version[2];
}
}
}
}
return self::$version;
}
示例6: id
/**
* Returns the current version of PHPUnit.
*
* @return string
*/
public static function id()
{
if (self::$version === null) {
self::$version = self::VERSION;
if (is_dir(dirname(dirname(__DIR__)) . '/.git')) {
$dir = getcwd();
chdir(__DIR__);
$version = exec('git describe --tags 2>&1', $output, $returnCode);
chdir($dir);
if ($version && $returnCode === 0) {
if (count(explode('.', self::VERSION)) == 3) {
self::$version = $version;
} else {
$version = explode('-', $version);
self::$version = self::VERSION . '-' . $version[2];
}
} else {
self::$version = self::VERSION . '-dev';
}
}
}
return self::$version;
}